select TCP UDP
Check if any sockets are ready for available read or write operations or error conditions. See function NetSock_Sel() for more information.
Files
net_bsd.h/net_bsd.c
Prototype
int select ( int desc_nbr_max,
struct fd_set *p_desc_rd,
struct fd_set *p_desc_wr,
struct fd_set *p_desc_err,
struct timeval *p_timeout);Arguments
desc_nbr_max
Maximum number of file descriptors in the file descriptor sets.
p_desc_rd
Pointer to a set of file descriptors to:
p_desc_wr
Pointer to a set of file descriptors to:
p_desc_err
Pointer to a set of file descriptors to:
p_timeout
Pointer to a timeout.
Returned Value
The number of file descriptors with available resources and/or operations if any.
0, on timeout.
-1, otherwise.