Share via


Socket Attribute Flags and Modes

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

There are several socket attributes that can be indicated through the flags parameter in WSPSocket. The WSA_FLAG_OVERLAPPED flag indicates that a socket will be used for overlapped I/O operations. Support of this attribute is mandatory for all service providers. See Winsock Overlapped I/O and Event Objects for more information. Note that creating a socket with the overlapped attribute has no impact on whether a socket is currently in the blocking or nonblocking mode. Sockets created with the overlapped attribute may be used to perform overlapped I/O, and doing so does not change the blocking mode of a socket. Because overlapped I/O operations do not block, the blocking mode of a socket is irrelevant for these operations.

Four additional attribute flags are used when creating sockets that are to be used for multipoint and/or multicast operations, and support for these attributes is optional. Providers that support multipoint attributes indicate this through the XP1_SUPPPORT_MULTIPOINT bit in their respective WSAPROTOCOL_INFOW structures. Only sockets that are created with multipoint-related attributes can be used in the WSPJoinLeaf function for creating multipoint sessions.

A socket is in one of two modes, blocking and nonblocking, at any time. Sockets are created in the blocking mode by default, and can be changed to nonblocking mode by calling WSPEventSelect, or WSPIoctl. A socket can be switched back to blocking mode by using WSPIoctl.

See Also

Concepts

Socket Creation and Descriptor Management