pyigtl
pyigtl copied to clipboard
Increase socket timeouts, or make them configurable
While it's possible to pass custom timeouts to OpenIGTLinkClient.wait_for_message(), the underlying socket is hardcoded to a 0.01 second timeout:
https://github.com/lassoan/pyigtl/blob/dadb658497a77004c66969876420a8ddec900f2d/pyigtl/comm.py#L314-L318
This timeout can quickly be reached when streaming large data (such as 1080p video at 30 fps), or alternating between multiple OpenIGTLink sockets while waiting for messages. Increasing the timeout might provide a better default, and maybe it should be made configurable as well.