FD_SET macro (winsock.h)

The FD_SET macro adds a file descriptor to an fd_set. If the file descriptor already exists within the set, and fd_count of the fd_set is less than FD_SETSIZE, then a duplicate will be added.

Syntax

void FD_SET(
   fd,
   set
);

Parameters

fd

A descriptor identifying a socket which will be added to the set.

set

A pointer to an fd_set.

Return value

None

Remarks

Be careful not to confuse the FD_SET macro with the typedef of the fd_set structure that's also named FD_SET. 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]
Target Platform Windows
Header winsock.h (include Winsock2.h, Winsock.h)

See also

WSAAsyncSelect

WSAEventSelect

select