import socket,time ADDR = ‘10.10.89.170’ PORT = 2425 udpSocket = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) while True: udpSocket.sendto(‘1:123456:xxx:cccc:32:沙雕’.encode(‘gbk’),(ADDR,PORT)) # time.sleep(0.5)