Alternative questions: 1. Is there a way to check if TCPSocket has any incoming data? 2. Is it possible to set timeout for `read` operation on a socket? 3. Can we convert TCPSocket to a file descriptor to use with `poll_fd`?
Any tips are welcome. Maybe it's possible to convert TCPSocket to a file descriptor? On Thursday, May 12, 2016 at 12:45:44 AM UTC+3, Andrei Zh wrote: > > Given several TCPSocket-s, how can I sequentially poll them and read the > first that becomes readable? > > I believe *nix's poll/select functions provide something similar for files > (and Julia has `poll_fd`), but what is the best way to approach this task > for sockets? >
