Skip to content

Instantly share code, notes, and snippets.

@nishidy
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nishidy/a0adb8c2ea06b553eb50 to your computer and use it in GitHub Desktop.
Save nishidy/a0adb8c2ea06b553eb50 to your computer and use it in GitHub Desktop.
client example
import sys
import socket
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect(("127.0.0.1",11111))
s="0"+"1"*5000+"9"
while True:
#print len(s)
#sock.send(s)
sbuf = raw_input()
if sbuf == "":
break
print len(sbuf)
sock.send(sbuf)
print sock.recv(65535)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment