Select, fd_set, and FD_XXX Macros
Since sockets are not represented by the UNIX-style, small, non-negative integer, the implementation of the select function was changed in Windows Sockets. Each set of sockets is still represented by the fd_set structure, but instead of being stored as a bitmask, the set is implemented as an array of sockets. To avoid potential problems, applications must adhere to the use of the FD_XXX macros to set (FD_SET), initialize (FD_ZERO), clear (FD_CLR), and check (FD_ISSET) the fd_set structures.
Related topics