Contains information about a set of files.
#include <sys/select.h> typedef struct fd_set { int fd_count; int fd_array[FD_SETSIZE]; } fd_set;
Specifies the number of files in the set.
Specifies an array of file descriptors.
The default value of FD_SETSIZE is 64. You can increase or decrease this value as long as you use the FD_ marcros to configure the fd_set structure.
The following macros are provided for manipulating handle sets; fd specifies a handle to be manipulated, and set specifies a handle set.
FD_ZERO (set)—Initializes a handle set to a NULL set. No error is returned if the set is not empty when FD_ZERO is called.
FD_SET (fd, set)—Includes a particular handle fd in set. If fd is already a member of the set, the macro has no effect.
FD_CLR (fd, set)—Removes fd from set. If fd is not a member of the set, the macro has no effect.
FD_ISSET (fd, set)—Is nonzero if fd is a member of a set; zero, otherwise