Python sock 编程 UPD通信

it2023-12-15  63

import socket ClientSocket=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)#创建套接字 sendtoAddr=("192.168.31.112",7561)#接收方的地址,端口 ClientSocket.sendto(b"hello,python",sendtoAddr)#发送数据
最新回复(0)