IP*Works! 2016 .NET Edition
IP*Works! 2016 .NET Edition
Questions / Feedback?

Linger Property

When set to True, connections are terminated gracefully.

Syntax

[VB.NET]
Public Property Linger As Boolean

[C#]
public bool Linger {get; set;}

Remarks

This property controls how a connection is closed. The default is True. In this case the connection is closed only after all the data is sent. Setting it to False forces an abrupt (hard) disconnection. Any data that was in the sending queue may be lost.

The default behavior (which is also the default mode for stream sockets) might result in an indefinite delay in closing the connection. Although the component returns control immediately, the system might indefinitely hold system resources until all pending data is sent (even after your application closes). This means that valuable system resources might be wasted.

Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you have sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.

This property is shared among incoming connections. When the property is set, the corresponding value is set for incoming connections as they are accepted. Existing connections are not modified.

Default Value

True

 
 
Copyright (c) 2020 /n software inc. - All rights reserved.
IP*Works! 2016 .NET Edition - Version 16.0 [Build 7353]