Files
Hacking-with-Python/04/client.py
Jimmy Xiang 0965a281f5 update -4
2020-12-04 22:11:58 +08:00

9 lines
171 B
Python

import socket
sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock_.connect(("localhost",9337))
msg = sock_.recv(1024)
sock_.close()
print(msg.decode("ascii"))