- socket_select(+TermsSockets, -NewTermsStreams, +TimeOut, +Streams, -ReadStreams) is det
- The list of streams in Streams is checked for readable
characters. A stream can be any stream associated with an I/O
descriptor. The list ReadStreams returns the streams with
readable data. socket_select/5 also waits for connections to the
sockets specified by TermsSockets. This argument should be a
list of Term-Socket pairs, where Term, which can be any term, is
used as an identifier. NewTermsStreams is a list of
Term-
connection(Client,Stream)
pairs, where Stream is a new
stream open for communicating with a process connecting to the
socket identified with Term, Client is the client host address
(see socket_accept/3). If TimeOut is instantiated to off, the
predicate waits until something is available. If TimeOut is S:U
the predicate waits at most S seconds and U microseconds. Both S
and U must be integers >=0. If there is a timeout, ReadStreams
and NewTermsStreams are [].