Created
July 17, 2017 14:28
-
-
Save pfreixes/7a85e43642782eb7e7d0669eadd0216a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import time | |
s = socket.socket( | |
socket.AF_INET, socket.SOCK_STREAM) | |
s.connect(("localhost", 6379)) | |
# give enought time to get the | |
# data plus the RST Package | |
time.sleep(1) | |
# read the data | |
print(s.recv(100)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output of the execution
$ python test_socket.py b'-ERR max number of clients reached\r\n'