socketSelect              package:base              R Documentation

_W_a_i_t _o_n _S_o_c_k_e_t _C_o_n_n_e_c_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     socketSelect(socklist, write = FALSE, timeout = NULL)

_A_r_g_u_m_e_n_t_s:

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.

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

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

_E_x_a_m_p_l_e_s:

     ## 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)

