IP*Works! V9 - Online Help
IP*Works! V9
Questions / Feedback?

Linger Property

When set to True, connections are terminated gracefully.

Object Oriented Interface

public function getLinger();
public function setLinger($value);

Procedural Interface

ipworks_ipport_get($res, 13 );
ipworks_ipport_set($res, 13, $value );

Default Value

true

Remarks

This property controls how a connection is closed. The default is True.

In the case that Linger is True (default), there are two scenarios for determining how long the connection will linger. The first, if LingerTime is 0 (default), the system will attempt to send pending data for a connection until the default IP protocol timeout expires.

In the second scenario, LingerTime is a positive value, the system will attempt to send pending data until the specified LingerTime is reached. If this attempt fails, then the system will reset the connection.

The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the class returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).

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

Data Type

Boolean

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0