update demo scripts to use addr tuples for bind and connect

closes bug #111928
This commit is contained in:
Jeremy Hylton 2000-08-25 15:38:41 +00:00
parent 239f836c10
commit a8d30d5d66
6 changed files with 9 additions and 9 deletions

View file

@ -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()