Close the socket gracefully without lingering.
ExclusiveAddressUse -5Enables a socket to be bound for exclusive access.
Debug 1Record debugging information.
IPOptions 1Specifies the IP options to be inserted into outgoing datagrams.
NoChecksum 1Send UDP datagrams with checksum set to zero.
NoDelay 1Disables the Nagle algorithm for send coalescing.
AcceptConnection 2The socket is listening.
BsdUrgent 2Use urgent data as defined in RFC-1222. This option can be set only once; after it is set, it cannot be turned off.
Expedited 2Use expedited data as defined in RFC-1222. This option can be set only once; after it is set, it cannot be turned off.
2Indicates that the application provides the IP header for outgoing datagrams.
TcpKeepAliveTime 3The number of seconds a TCP connection will remain alive/idle before keepalive probes are sent to the remote.
TypeOfService 3Change the IP header type of the service field.
IpTimeToLive 4Set the IP header Time-to-Live field.
ReuseAddress 4Allows the socket to be bound to an address that is already in use.
KeepAlive 8Use keep-alives.
MulticastInterface 9Set the interface for outgoing multicast packets.
MulticastTimeToLive 10An IP multicast Time to Live.
MulticastLoopback 11An IP multicast loopback.
AddMembership 12Add an IP group membership.
DropMembership 13Drop an IP group membership.
DontFragment 14Do not fragment IP datagrams.
AddSourceMembership 15Join a source group.
FastOpen 15Enables TCP Fast Open as defined in RFC-7413. The actual observed behavior depends on OS configuration and the state of the kernel TCP cookie cache. Using TFO is only recommended in controlled networking environments, meaning that each middlebox (for example, firewall, router, proxy) on the networking path between the client and server is known and can be configured to support TFO. Using TFO outside of controlled environments (such as the open internet) can lead to connectivity issues.
DontRoute 16Do not route; send the packet directly to the interface addresses.
DropSourceMembership 16Drop a source group.
TcpKeepAliveRetryCount 16The number of TCP keep alive probes that will be sent before the connection is terminated.
BlockSource 17Block data from a source.
TcpKeepAliveInterval 17The number of seconds a TCP connection will wait for a keepalive response before sending another keepalive probe.
UnblockSource 18Unblock a previously blocked source.
PacketInformation 19Return information about received packets.
ChecksumCoverage 20Set or get the UDP checksum coverage.
HopLimit 21Specifies 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.
IPProtectionLevel 23Enables restriction of a IPv6 socket to a specified scope, such as addresses with the same link local or site local prefix. This socket option enables applications to place access restrictions on IPv6 sockets. Such restrictions enable an application running on a private LAN to simply and robustly harden itself against external attacks. This socket option widens or narrows the scope of a listening socket, enabling unrestricted access from public and private users when appropriate, or restricting access only to the same site, as required. This socket option has defined protection levels specified in the IPProtectionLevel enumeration.
IPv6Only 27Indicates if a socket created for the AF_INET6 address family is restricted to IPv6 communications only. Sockets created for the AF_INET6 address family may be used for both IPv6 and IPv4 communications. Some applications may want to restrict their use of a socket created for the AF_INET6 address family to IPv6 communications only. When this value is non-zero (the default on Windows), a socket created for the AF_INET6 address family can be used to send and receive IPv6 packets only. When this value is zero, a socket created for the AF_INET6 address family can be used to send and receive packets to and from an IPv6 address or an IPv4 address. Note that the ability to interact with an IPv4 address requires the use of IPv4 mapped addresses. This socket option is supported on Windows Vista or later.
Broadcast 32Permit sending broadcast messages on the socket.
UseLoopback 64Bypass hardware when possible.
Linger 128Linger on close if unsent data is present.
OutOfBandInline 256Receives out-of-band data in the normal data stream.
SendBuffer 4097Specifies the total per-socket buffer space reserved for sends. This is unrelated to the maximum message size or the size of a TCP window.
ReceiveBuffer 4098Specifies the total per-socket buffer space reserved for receives. This is unrelated to the maximum message size or the size of a TCP window.
SendLowWater 4099Specifies the low water mark for Send operations.
ReceiveLowWater 4100Specifies the low water mark for Receive operations.
SendTimeout 4101Send a time-out. This option applies only to synchronous methods; it has no effect on asynchronous methods such as the BeginSend(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object) method.
ReceiveTimeout 4102Receive a time-out. This option applies only to synchronous methods; it has no effect on asynchronous methods such as the BeginSend(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object) method.
Error 4103Gets the error status and clear.
Type 4104Gets the socket type.
ReuseUnicastPort 12295Indicates that the system should defer ephemeral port allocation for outbound connections. This is equivalent to using the Winsock2 SO_REUSE_UNICASTPORT socket option.
UpdateAcceptContext 28683Updates 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.
UpdateConnectContext 28688Updates 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.
MaxConnections 2147483647Not supported; will throw a SocketException if used.
The following code example uses this enumeration to set socket options.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4