Mono Class Library: System.Net.Sockets NamespaceSystem.Net.Sockets.SocketOptionLevel Enumeration |
|
Some socket options apply only to specific protocols while others apply to all types. Members of this enumeration specify which protocol applies to a specific socket option. [Edit]
Member Name Description IP Specifies that members of the System.Net.Sockets.SocketOptionName enumeration apply to Internet Protocol (IP).
The following table lists the members of the System.Net.Sockets.SocketOptionName enumeration used with this level.
[Edit]
SocketOptionName Description of Socket Option Data HeaderIncluded A bool where true indicates the application is providing the IP header for outgoing datagrams. IPOptions A byte array that specifies IP options to be inserted into outgoing datagrams. IpTimeToLive A int that specifies the time-to-live for datagrams. The time-to-live designates the number of networks on which the datagram is allowed to travel before being discarded by a router. MulticastInterface A byte array that specifies the interface for outgoing multicast packets. MulticastLoopback A bool where true enables multicast loopback. MulticastTimeToLive A int that specifies the time-to-live for multicast datagrams. TypeOfService A int that specifies the type of service field in the IP header. UseLoopback A bool where true indicates Bypass hardware when possible. IPv6 Documentation for this section has not yet been entered. [Edit] Socket Specifies that members of the System.Net.Sockets.SocketOptionName enumeration are not specific to a particular protocol.
The following table lists the members of the System.Net.Sockets.SocketOptionName enumeration used with this level.
[Edit]
SocketOptionName Description Broadcast A bool where true indicates broadcast messages are allowed to be sent to the socket. Debug A bool where true indicates to record debugging information. DontLinger A bool where true indicates to close the socket without lingering. DontRoute A bool where true indicates not to route data; false indicates to send data directly to interface addresses. Error A int that contains the error code associated with the last socket error. The error code is cleared by this option. This option is read-only. KeepAlive A bool where true (the default) indicates to enable keep-alives, which allows a connection to remain open after a request. OutOfBandInline A bool where true indicates to receive out-of-band data in the normal data stream. ReceiveBuffer A int that specifies the total per-socket buffer space reserved for receives. This is unrelated to the maximum message size or the size of a TCP window. ReceiveTimeout A int that specifies the maximum time, in milliseconds, the Socket.Receive(Byte[], int, SocketFlags) and Socket.ReceiveFrom(Byte[], int, int, SocketFlags, System.Net.EndPoint@) methods will block when attempting to receive data. If data is not received within this time, a System.Net.Sockets.SocketException exception is thrown. ReuseAddress A bool where true allows the socket to be bound to an address that is already in use. SendBuffer A int that specifies the total per-socket buffer space reserved for sends. This is unrelated to the maximum message size or the size of a TCP window. SendTimeout A int that specifies the maximum time, in milliseconds, the Socket.Send(Byte[], int, SocketFlags) and Socket.SendTo(Byte[], int, int, SocketFlags, System.Net.EndPoint) methods will block when attempting to send data. If data is not sent within this time, a System.Net.Sockets.SocketException exception is thrown. Type One of the values defined in the System.Net.Sockets.SocketType enumeration. This option is read-only.
Tcp Specifies that members of the System.Net.Sockets.SocketOptionName enumeration apply to Transmission Control Protocol (TCP).
The following table lists the members of the System.Net.Sockets.SocketOptionName enumeration used with this level.
[Edit]
SocketOptionName Description of Socket Option Data BsdUrgent A bool where true indicates to use urgent data as defined by IETF RFC 1222. Once set, this option cannot be turned off. Expedited A bool where true indicates to use expedited data as defined by IETF RFC 1222. Once set, this option cannot be turned off. NoDelay A bool where true indicates to disable the Nagle algorithm for send coalescing. Udp Specifies that members of the System.Net.Sockets.SocketOptionName enumeration apply to User Datagram Protocol (UDP).
The following table lists the members of the System.Net.Sockets.SocketOptionName enumeration used with this level.
[Edit]
SocketOptionName Description of Socket Option Data ChecksumCoverage A bool that specifies UDP checksum coverage. NoChecksum A bool where true indicates to send UDP datagrams with the checksum set to zero.
Namespace: System.Net.Sockets
Assembly: System (in System.dll)
Assembly Versions: 1.0.x.x, 1.0.5000.0, 2.0.0.0