IPWorks MQ 2020 Android Edition

Questions / Feedback?

Linger Property

When set to True, connections are terminated gracefully.

Syntax

public boolean isLinger();
public void setLinger(boolean linger);

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) 2022 /n software inc. - All rights reserved.
IPWorks MQ 2020 Android Edition - Version 20.0 [Build 8155]