How to configure socket.timeout in Blender Python script -
when tried implement 1 of python scripts in blender, noticed programme remains frozen until receives data. read exception socket.timeout must used, i'm not able configure it. can kindly explain changes need made?
ip_udp = "192.168.1.102" # local ip of machine porta_udp = 12345#local port sock = socket.socket( socket.af_inet, socket.sock_dgram ) sock.settimeout(5); sock.bind( (ip_udp,porta_udp) ) # value messaggio, indirizzo = sock.recvfrom( 1024 ) print ("messaggio ricevuto :", messaggio) python sockets blender
No comments:
Post a Comment