public class LingerOption
|
If LingerOption.Enabled is false, calling the Socket.Close method will immediately close the connection to the network. If LingerOption.Enabled is true, data will continue to be sent to the network with a time-out of LingerOption.LingerTime, in seconds. Once the data is sent, or once the time-out expires, the connection is gracefully closed. If no data is in the send queue, the socket is closed immediately.
When LingerOption.Enabled is true and LingerOption.LingerTime is zero, calling Socket.Close will close the socket immediately and lose any unsent data.
LingerOption myOpts = new LingerOption(true,1); mySocket.SetSocketOption(SocketOptionLevel.IP,SocketOptionName.Linger,myOpts);
ctor #1 | Initializes a new instance of the LingerOption class. |
Enabled | Read-write Gets or sets a value indicating whether to linger after the socket is closed. |
LingerTime | Read-write Gets or sets the amount of time to remain connected after the socket is closed. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
enable
seconds
public bool Enabled {get; set;}
|
public int LingerTime {get; set;}
|
~LingerOption(); |
public virtual int GetHashCode(); |
public Type GetType(); |
protected object MemberwiseClone(); |
public virtual string ToString(); |