Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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))
Owner

pfreixes commented Jul 17, 2017

Output of the execution

$ python test_socket.py
b'-ERR max number of clients reached\r\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment