Closed ensonic closed 6 years ago
See OpenRoberta/robertalab#680
We'll need to make the socket non-blocking and poll: https://docs.python.org/3.3/howto/sockets.html#non-blocking-sockets https://docs.python.org/3.3/library/socket.html#socket.socket.setblocking or we can use a timeout: https://docs.python.org/3.3/library/socket.html#socket.socket.settimeout catch the timeout exception and loop, so that canceling works.
For reference the pybluez code: https://github.com/karulis/pybluez/
See OpenRoberta/robertalab#680
We'll need to make the socket non-blocking and poll: https://docs.python.org/3.3/howto/sockets.html#non-blocking-sockets https://docs.python.org/3.3/library/socket.html#socket.socket.setblocking or we can use a timeout: https://docs.python.org/3.3/library/socket.html#socket.socket.settimeout catch the timeout exception and loop, so that canceling works.
For reference the pybluez code: https://github.com/karulis/pybluez/