listing14-2.py 120 B

123456789
  1. import socket
  2. s = socket.socket()
  3. host = socket.gethostname()
  4. port = 1234
  5. s.connect((host, port))
  6. print(s.recv(1024))