System::Net::Sockets::SocketOptionName enum

SocketOptionName enum

Defines socket option names for the Socket class.

enum class SocketOptionName

Values

NameValueDescription
Debug1Record debugging information.
AcceptConnection2Indicates if a socket is listening for an incoming connection.
ReuseAddress4Indicates if a socket can be bound to the address that is already in use.
KeepAlive8Enables the ‘Keep-Alive’ packets for a socket connection.
DontRoute16Indicates if a packet is sent directly to the interface addresses.
Broadcast32Indicates if a socket can send the broadcast messages.
UseLoopback64Bypass hardware when possible.
Linger128The system will block the process on the close attempt until it is able to transmit the data.
OutOfBandInline256Receives out-of-band data in the normal data stream.
DontLingern/aIndicates if a socket will be closed without lingering.
ExclusiveAddressUsen/aA socket will use the bound address exclusively.
SendBuffer4097Specifies the send buffer size.
ReceiveBuffer4098Specifies the receive buffer size.
SendLowWater4099Specifies the minimum amount of data for the send operations.
ReceiveLowWater4100Specifies the minimum amount of data for the receive operations.
SendTimeout4101Specifies the timeout for the synchronous send operations.
ReceiveTimeout4102Specifies the timeout for the synchronous receive operations.
Error4103Returns the error status and clear.
Type4104Returns a socket type.
ReuseUnicastPort12295Indicates if the system should defer the ephemeral port allocation for the outbound connections.
MaxConnections2147483647This option is not supported. It was used to specify the maximum queue length for listening.
IPOptions1Specifies the IP option that must be inserted to outgoing datagrams.
HeaderIncluded2The header is included to outgoing datagrams.
TypeOfService3Change the IP header type of the service field.
IpTimeToLive4The IP time to live.
MulticastInterface9Set the interface for the outgoing multicast packets.
MulticastTimeToLive10The IP multicast time to live.
MulticastLoopback11The IP Multicast loopback.
AddMembership12Add an IP group membership.
DropMembership13Drop an IP group membership.
DontFragment14Don’t fragment the IP datagrams.
AddSourceMembership15Join the IP group/source.
DropSourceMembership16Drop the IP group/source.
BlockSource17Block the IP group/source.
UnblockSource18Unblock the IP group/source.
PacketInformation19Receive packet information for IPv4.
HopLimit21Delivers an integer containing the HOP count of the packet.
IPProtectionLevel23Enables restriction of an IPv6 socket to the specified scope.
IPv6Only27The socket is restricted to send and receive IPv6 packets only.
NoDelay1Disables the Nagle algorithm for coalescing the send packets.
BsdUrgent2Use the urgent data as defined in RFC-1222.
Expedited2Use the expedited data as defined in RFC-1222.
NoChecksum1Send the UDP datagrams with a checksum set to zero.
ChecksumCoverage20Set or get the UDP checksum coverage.
UpdateAcceptContext28683Updates a client socket with the same properties of a listening socket.
UpdateConnectContext28688Updates a client socket with the same properties of a listening socket.

See Also