from socket import *
ip_prot = ('192.168.55.1',8080)
buffer_size = 1024
udp_sever = socket(AF_INET,SOCK_DGRAM) #DGRAM--数据报式套接字
udp_sever.bind(ip_prot)
while True:
data,addr = udp_sever.recvfrom(buffer_size)
udp_sever.sendto(data.upper(),addr)
from socket import *
ip_prot = ('192.168.55.1',8080)
buffer_size = 1024
udp_sever = socket(AF_INET,SOCK_DGRAM) #DGRAM--数据报式套接字
udp_sever.bind(ip_prot)
while True:
data,addr = udp_sever.recvfrom(buffer_size)
udp_sever.sendto(data.upper(),addr)