Share via


Socket Options and IOCTLs (Windows Embedded CE 6.0)

1/6/2010

The socket options for Winsock are summarized in the following table. More detailed information is provided in section 4 under WSPGetSockOpt and/or WSPSetSockOpt. There are other new protocol-specific socket options that can be found in the Protocol-Specific Annex.

A Windows Sockets service provider must recognize all of these options, and (for WSPGetSockOpt) return plausible values for each. The default value for each option is shown in the following table.

Value Type Description Default Note

SO_ACCEPTCONN

BOOL

Socket is listening.

FALSE unless a WSPListen has been performed.

SO_BROADCAST

BOOL

Socket is configured for the transmission of broadcast messages.

FALSE

SO_DEBUG

BOOL

Debugging is enabled.

FALSE

(i)

SO_DONTLINGER

BOOL

If true, the SO_LINGER option is disabled.

TRUE

SO_DONTROUTE

BOOL

Routing is disabled. Not supported on ATM sockets (results in an error).

FALSE

(i)

SO_ERROR

int

Retrieves error status and clear.

0

SO_GROUP_ID

GROUP

Reserved.

NULL

Get only

SO_GROUP_PRIORITY

int

Reserved.

0

SO_KEEPALIVE

BOOL

Keepalives are being sent. Not supported on ATM sockets (results in an error).

FALSE

(i)

SO_LINGER

Structure linger

Returns the current linger options.

l_onoff is 0

SO_MAX_MSG_SIZE

int

Maximum outbound size of a message for message socket types. There is no provision to determine the maximum inbound message size. Has no meaning for stream-oriented sockets.

Implementation dependent

Get only

SO_OOBINLINE

BOOL

OOB data is being received in the typical data stream.

FALSE

SO_PROTOCOL_INFOW

structure WSAPROTOCOL_INFOW

Description of protocol information for the protocol that is bound to this socket.

Protocol dependent

Get only

SO_RCVBUF

int

Buffer size for receives.

Implementation dependent

(i)

SO_REUSEADDR

BOOL

The address to which this socket is bound can be used by others. Not applicable on ATM sockets.

FALSE

SO_SNDBUF

int

Total per-socket buffer space reserved for sends. This is unrelated to SO_MAX_MSG _SIZE or the size of a TCP window.

Implementation dependent

(i)

SO_TYPE

int

The type of the socket (for example, SOCK_STREAM).

As created through socket.

PVD_CONFIG

char FAR *

An opaque data structure object containing configuration information of the service provider.

Implementation dependent

TCP_NODELAY

BOOL

Disables the Nagle algorithm for send coalescing.

Implementation dependent

 

Note

(i) A service provider may silently ignore this option on WSPSetSockOpt and return a constant value for WSPGetSockOpt, or it may accept a value for WSPSetSockOpt and return the corresponding value in WSPGetSockOpt without using the value in any way.

See Also

Concepts

Winsock Service Provider Interface (SPI)
Summary of Socket IOCTL Opcodes