\Header{socketSelect}{Wait on Socket Connections}
\keyword{connection}{socketSelect}
\begin{Description}\relax
Waits for the first of several socket connections to become available.\end{Description}
\begin{Usage}
\begin{verbatim}
socketSelect(socklist, write = FALSE, timeout = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{socklist}] list of open socket connections
\item[\code{write}] logical. If \code{TRUE} wait for corresponding socket to
become available for writing; otherwise wait for it to become
available for reading.
\item[\code{timeout}] numeric or \code{NULL}. Time in seconds to wait for a
socket to become available; \code{NULL} means wait
indefinitely.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The values in \code{write} are recycled if necessary to make up a
logical vector the same length as \code{socklist}. Socket connections
can appear more than once in \code{socklist}; this can be useful if
you want to determine whether a socket is available for reading or
writing.\end{Details}
\begin{Value}
Logical the same length as \code{socklist} indicating
whether the corresponding socket connection is available for
output or input, depending on the corresponding value of \code{write}.\end{Value}
\begin{Examples}
\begin{ExampleCode}
## Don't run: 
## test whether socket connection s is available for writing or reading
socketSelect(list(s,s),c(TRUE,FALSE),timeout=0)
## End Don't run
\end{ExampleCode}
\end{Examples}

