SocketOptionName Enumeration

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Defines configuration option names.

Namespace:  System.Net.Sockets
Assembly:  System (in System.dll)

public enum SocketOptionName

Member nameDescription
DebugRecord debugging information.
AcceptConnectionThe socket is listening.
ReuseAddressAllows the socket to be bound to an address that is already in use.
KeepAliveUse keep-alives.
DontRouteDo not route; send the packet directly to the interface addresses.
BroadcastPermit sending broadcast messages on the socket.
UseLoopbackBypass hardware when possible.
LingerLinger on close if unsent data is present.
OutOfBandInlineReceives out-of-band data in the normal data stream.
DontLingerClose the socket gracefully without lingering.
ExclusiveAddressUseEnables a socket to be bound for exclusive access.
SendBufferSpecifies the total per-socket buffer space reserved for sends. This is unrelated to the maximum message size or the size of a TCP window.
ReceiveBufferSpecifies the total per-socket buffer space reserved for receives. This is unrelated to the maximum message size or the size of a TCP window.
SendLowWaterSpecifies the low water mark for Send operations.
ReceiveLowWaterSpecifies the low water mark for Receive operations.
SendTimeoutSend a time-out. This option applies only to synchronous methods; it has no effect on asynchronous methods such as the BeginSend method.
ReceiveTimeoutReceive a time-out. This option applies only to synchronous methods; it has no effect on asynchronous methods such as the BeginSend method.
ErrorGet the error status and clear.
TypeGet the socket type.
MaxConnectionsNot supported; will throw a SocketException if used.
IPOptionsSpecifies the IP options to be inserted into outgoing datagrams.
HeaderIncludedIndicates that the application provides the IP header for outgoing datagrams.
TypeOfServiceChange the IP header type of the service field.
IpTimeToLiveSet the IP header Time-to-Live field.
MulticastInterfaceSet the interface for outgoing multicast packets.
MulticastTimeToLiveAn IP multicast Time to Live.
MulticastLoopbackAn IP multicast loopback.
AddMembershipAdd an IP group membership.
DropMembershipDrop an IP group membership.
DontFragmentDo not fragment IP datagrams.
AddSourceMembershipJoin a source group.
DropSourceMembershipDrop a source group.
BlockSourceBlock data from a source.
UnblockSourceUnblock a previously blocked source.
PacketInformationReturn information about received packets.
HopLimitSpecifies the maximum number of router hops for an Internet Protocol version 6 (IPv6) packet. This is similar to Time to Live (TTL) for Internet Protocol version 4.
NoDelayDisables the Nagle algorithm for send coalescing.
BsdUrgentUse urgent data as defined in RFC-1222. This option can be set only once; after it is set, it cannot be turned off.
ExpeditedUse expedited data as defined in RFC-1222. This option can be set only once; after it is set, it cannot be turned off.
NoChecksumSend UDP datagrams with checksum set to zero.
ChecksumCoverageSet or get the UDP checksum coverage.
UpdateAcceptContextUpdates an accepted socket's properties by using those of an existing socket. This is equivalent to using the Winsock2 SO_UPDATE_ACCEPT_CONTEXT socket option and is supported only on connection-oriented sockets.
UpdateConnectContextUpdates a connected socket's properties by using those of an existing socket. This is equivalent to using the Winsock2 SO_UPDATE_CONNECT_CONTEXT socket option and is supported only on connection-oriented sockets.

The SocketOptionName enumeration defines the name of each Socket configuration option. Sockets can be configured with the Socket..::..SetSocketOption method.

Show: