socketSelect

0th

Percentile

Wait on Socket Connections

Waits for the first of several socket connections to become available.

Keywords
connection
Usage
socketSelect(socklist, write = FALSE, timeout = NULL)
Arguments
socklist
list of open socket connections
write
logical. If TRUE wait for corresponding socket to become available for writing; otherwise wait for it to become available for reading.
timeout
numeric or NULL. Time in seconds to wait for a socket to become available; NULL means wait indefinitely.
Details

The values in write are recycled if necessary to make up a logical vector the same length as socklist. Socket connections can appear more than once in socklist; this can be useful if you want to determine whether a socket is available for reading or writing.

Value

socklist indicating whether the corresponding socket connection is available for output or input, depending on the corresponding value of write.

Aliases
  • socketSelect
Examples
library(base) ## Not run: # ## test whether socket connection s is available for writing or reading # socketSelect(list(s, s), c(TRUE, FALSE), timeout = 0) # ## End(Not run)
Documentation reproduced from package base, version 3.3.0, License: Part of R 3.3.0

Community examples

Looks like there are no examples yet.