功能:监听服务器的UDP端口,输出端口接收的数据 #encoding:utf-8 import socket global udp global ip global port def listen_port(ip, port): udp = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) udp.bind((ip, port)) while True: print udp.recv(102400) if __name__ == '__main__'…