diff options
Diffstat (limited to 'Demo/sockets/udpecho.py')
-rwxr-xr-x | Demo/sockets/udpecho.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Demo/sockets/udpecho.py b/Demo/sockets/udpecho.py index 8a6bd21..9966fd8 100755 --- a/Demo/sockets/udpecho.py +++ b/Demo/sockets/udpecho.py @@ -56,7 +56,8 @@ def client(): line = sys.stdin.readline() if not line: break - s.sendto(line, addr) + print('addr = ', addr) + s.sendto(bytes(line, 'ascii'), addr) data, fromaddr = s.recvfrom(BUFSIZE) print('client received %r from %r' % (data, fromaddr)) |