复制代码 代码如下:#coding: utf-8import socketimport selectimport timeimport osimport threading def ser(): s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.bind((“”,43244)) while 1: infds,outfds,errfds = select.select([s],[],[],5) if infds: sms = s.recv(1024)