python创建udp服务端和客户端

1.udp服务端server1 from socket import *2 from time import ctime34 HOST = 5 PORT = 88886 BUFSIZ = 10247 ADDR = (HOST, PORT)89 udpSerSock = socket(AF_INET, SOCK_DGRAM)10 udpSerSock.bind(ADDR)1112 while True:13 print(waiting for message…)14

返回顶部