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)

