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/udpecho.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/udpecho.py')
-rwxr-xr-x | Demo/sockets/udpecho.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Demo/sockets/udpecho.py b/Demo/sockets/udpecho.py index 8fce547..4410165 100755 --- a/Demo/sockets/udpecho.py +++ b/Demo/sockets/udpecho.py @@ -33,7 +33,7 @@ def server(): else: port = ECHO_PORT s = socket(AF_INET, SOCK_DGRAM) - s.bind('', port) + s.bind(('', port)) print 'udp echo server ready' while 1: data, addr = s.recvfrom(BUFSIZE) @@ -50,7 +50,7 @@ def client(): port = ECHO_PORT addr = host, port s = socket(AF_INET, SOCK_DGRAM) - s.bind('', 0) + s.bind(('', 0)) print 'udp echo client ready, reading stdin' while 1: line = sys.stdin.readline() |