tcp_select(
-Term)
The purpose of tcp_select/1
is to process connection requests, return
terms related to timing, and return in a round-robin fashion terms read from
connected processes. Term is one of:
connected(
Socket)
wakeup(
Term)
tcp_schedule_wakeup/2
was delivered (see
ipc-tcp-tim-schedule_wakeup2).
user_input
stdin
and tcp_watch_user(_,on)
has been called. See
tcp_watch_user/2
, ipc-tcp-utc-watch_user2.
term(
Socket,
Term)
tcp_send/2
(see ipc-tcp-trm-send2). This is the result of a read from the socket.
end_of_file(
Socket)
Windows caveats:
tcp_select/[1,2]
is not interruptible by ^C. For this reason, callingtcp_select/2
with infinite timeout is probably a bad idea. If called with infinite timeout and if there are no open sockets, thentcp_select/2
will return immediately, indicating a timeout.