diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-08-25 15:38:41 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-08-25 15:38:41 (GMT) |
commit | a8d30d5d667b32b1b296c0926a0e80709bd6fab3 (patch) | |
tree | a68f728c1c466ea08e04c3dcf08e2cafa2746132 /Demo/sockets/throughput.py | |
parent | 239f836c10425bb2514284dd4eb4fc63b206b587 (diff) | |
download | cpython-a8d30d5d667b32b1b296c0926a0e80709bd6fab3.zip cpython-a8d30d5d667b32b1b296c0926a0e80709bd6fab3.tar.gz cpython-a8d30d5d667b32b1b296c0926a0e80709bd6fab3.tar.bz2 |
update demo scripts to use addr tuples for bind and connect
closes bug #111928
Diffstat (limited to 'Demo/sockets/throughput.py')
-rwxr-xr-x | Demo/sockets/throughput.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Demo/sockets/throughput.py b/Demo/sockets/throughput.py index 58975bf..fa250e7 100755 --- a/Demo/sockets/throughput.py +++ b/Demo/sockets/throughput.py @@ -44,7 +44,7 @@ def server(): else: port = MY_PORT s = socket(AF_INET, SOCK_STREAM) - s.bind('', port) + s.bind(('', port)) s.listen(1) print 'Server ready...' while 1: @@ -72,7 +72,7 @@ def client(): t1 = time.time() s = socket(AF_INET, SOCK_STREAM) t2 = time.time() - s.connect(host, port) + s.connect((host, port)) t3 = time.time() i = 0 while i < count: |