mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
parent
ef6a19e3ea
commit
06fd5f8cc8
5 changed files with 38 additions and 30 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue