> python udp_server.py Server start at: 127.0.0.1:5000 Received from ('127.0.0.1', 55893) 你好 # 客户端发送的消息 Received from ('127.0.0.1', 55893) 告辞 # 客户端发送的消息
启动客户端:
> python udp_client.py Input your msg:你好 # 输入要发送的内容 Server received 你好 # 服务端返回的内容 Input your msg:告辞 Server received 告辞 Input your msg: