Python Socket Using Select To Check For Data
I found the following code on another post that works pretty good: UDP_IP = '' UDP_PORT = 5008 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET,
Solution 1:
Use the timeout parameter in the select statement. If no data is available (indicated by empty lists), you can do whatever other processing is needed in the body of the while loop.
Post a Comment for "Python Socket Using Select To Check For Data"