#include <sys/select.h> |
|
|
#include <sys/select.h> #include <sys/time.h> /* Header files */ int select( int nfds, fd_set * readfds, // a bit array fd_set * writefds, // a bit array fd_set * errorfds, // a bit array struct timeval * timeout ); |
Meaning of the parameters:
nfds = number of bits used in readfds, writefds and errorfds readfds = descriptor bit array to test for read readiness (NULL means empty set) The ith bit in the bit array corresponds to the file descriptor i writefds = descriptor bit array to test for write readiness (NULL means empty set) errorfds = descriptor bit array to test for error conditions (NULL means empty set) timeout = maximum wait duration (time out value) (NULL means wait indefinitely) |
|