FD_SET macro (winsock2.h)

The FD_SET macro adds a file descriptor to an fd_set. If the file descriptor already exist within the set, a duplicate will not 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 a 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 winsock2.h (include Winsock2.h, Winsock.h)

See also

WSAAsyncSelect

WSAEventSelect

select