summaryrefslogtreecommitdiffstats
path: root/Demo/sockets/udpecho.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/sockets/udpecho.py')
-rwxr-xr-xDemo/sockets/udpecho.py4
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()