waiting on port: 8081
reciveed: hello world from ('127.0.0.1', 62644)
补充:
socket.sendto(string[, flags], address)
官方文档如下:
Send data to the socket. The socket should not be connected to a remote socket, since the destination socket is specified by address. The optional flags argument has the same meaning as for recv() above. Return the number of bytes sent. (The format of address depends on the address family — see above.)address参数在协议类型为socket.SOCK_DGRAM时,address的结构为一个元组,(host,port)的格式
希望本文所述对大家的Python程序设计有所帮助。
发布php中文网,转载请注明出处,感谢您的尊重!