fd_set structure (winsock2.h)
The fd_set structure is used by various Windows Sockets functions and service providers, such as the select function, to place sockets into a "set" for various purposes, such as testing a given socket for readability using the readfds parameter of the select function.
Syntax
typedef struct fd_set {
u_int fd_count;
SOCKET fd_array[FD_SETSIZE];
} fd_set, FD_SET, *PFD_SET, *LPFD_SET;
Members
fd_count
The number of sockets in the set.
fd_array[FD_SETSIZE]
An array of sockets that are in the set. The variable FD_SETSIZE defaults to 64.
Remarks
Be careful not to confuse the FD_SET typedef of the fd_set structure with the FD_SET macro. That said, the FD_SET macro and the fd_set structure are related, and often used in conjunction.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | winsock2.h (include Winsock2.h, Winsock.h) |