Created
March 12, 2012 23:00
-
-
Save bergundy/2025259 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from tornado.util import b | |
import socket | |
import sys | |
MB = 0x100000 | |
dlen = 5 * MB | |
data = b("A") * dlen + "\r\n" | |
port = 16661 | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) | |
s.connect((sys.argv[1, port)) | |
print s.recv(1024) | |
s.send(data) | |
print s.recv(1024) | |
# sample runner: | |
# for x in `seq 100`; do python2.7 simple_client.py & done; time wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment