import socket client = socket.socket() client.connect(('127.0.0.1',8001)) while 1: msg = input('客户端说>>>') client.send(msg.encode('utf-8')) from_server_msg = client.recv(1024) print(from_server_msg.decode('utf-8'))
import socket client = socket.socket() client.connect(('127.0.0.1',8001)) while 1: msg = input('客户端说>>>') client.send(msg.encode('utf-8')) from_server_msg = client.recv(1024) print(from_server_msg.decode('utf-8'))