Mono Class Library: System.Net.Sockets NamespaceSystem.Net.Sockets.LingerOption Class |
See Also: LingerOption Members
|
All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.
An instance of this class is passed into the Socket.SetSocketOption(SocketOptionLevel, SocketOptionName, int) method and is returned by the Socket.GetSocketOption(SocketOptionLevel, SocketOptionName) method when the optionName parameter is set to SocketOptionName.Linger.
When the LingerOption.Enabled property is true, any queued data continues to be sent until time equal to the setting of the LingerOption.LingerTime property has passed or until the input queue is empty. At this time, the connection is closed.
When the LingerOption.LingerTime property is zero or the LingerOption.Enabled property is false, calling Socket.Close immediately closes the socket and any pending data is lost.
When setting the SocketOptionName.Linger option of an instance of the System.Net.Sockets.Socket class, a ArgumentException exception is thrown if the LingerOption.LingerTime property is less than zero or greater than ushort.MaxValue. [Edit]
Namespace: System.Net.Sockets
Assembly: System (in System.dll)
Assembly Versions: 1.0.x.x, 1.0.5000.0, 2.0.0.0