Export (0) Print
Expand All
5 out of 5 rated this helpful - Rate this topic

IPPROTO_TCP Socket Options

The following table describes IPPROTO_TCP socket options that apply to sockets created for the IPv4 and IPv6 address families (AF_INET and AF_INET6) with the protocol parameter to the socket function specified as TCP (IPPROTO_TCP). See the getsockopt and setsockopt function reference pages for more information on getting and setting socket options.

To enumerate protocols and discover supported properties for each installed protocol, use the WSAEnumProtocols, WSCEnumProtocols, or WSCEnumProtocols32 function.

IPPROTO_TCP Socket Options
OptionGetSetOptval typeDescription
TCP_BSDURGENTyesyesDWORD (boolean)If TRUE, the service provider implements the Berkeley Software Distribution (BSD) style (default) for handling expedited data. This option is the inverse of the TCP_EXPEDITED_1122 option. This option can be set on the connection only once. Once this option is set on, this option cannot be turned off. This option is not required to be implemented by service providers. The option is enabled (set to TRUE) by default.
TCP_EXPEDITED_1122yesyesDWORD (boolean)If TRUE, the service provider implements the expedited data as specified in RFC-1222. Otherwise, the Berkeley Software Distribution (BSD) style (default) is used. This option can be set on the connection only once. Once this option is set on, this option cannot be turned off. This option is not required to be implemented by service providers.
TCP_NODELAYyesyesDWORD (boolean)Enables or disables the Nagle algorithm for TCP sockets. This option is disabled (set to FALSE) by default.

 

Windows Support for IPPROTO_TCP options
OptionWindows 7Windows Server 2008Windows VistaWindows Server 2003Windows XPWindows 2000Windows NT4Windows 9x/Me
TCP_BSDURGENTxxxxxxx
TCP_EXPEDITED_1122xxxxxx
TCP_NODELAYxxxxxxx

 

Remarks

On the Microsoft Windows Software Development Kit (SDK) released for Windows Vista and later, the organization of header files has changed and IPPROTO_TCP level is defined in the Ws2def.h header file which is automatically included in the Winsock2.h header file. The IPPROTO_TCP socket options, with the exception of TCP_BSDURGENT, are defined in the Ws2ipdef.h header file which is automatically included in the Ws2tcpip.h header file. The TCP_BSDURGENT option for historic reasons is defined in the Mswsock.h header file. The Ws2def.h and Ws2ipdef.h header files should never be used directly.

Requirements

Header

Ws2def.h (include Winsock2.h);
Winsock2.h on Windows Server 2003, Windows XP, and Windows 2000

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.