Linger Property

When set to True, connections are terminated gracefully.

Syntax

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

Default Value

True

Remarks

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

In the case that Linger is True (default), the class will attempt to send pending data and await all packets to be acknowledged until the specified Timeout is reached. If Timeout is reached and there are still unackwoledged packets, then the connection will be reset and Status will fire with an informational entry.

Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent, setting this property to False might be the appropriate course of action.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks P2P 2020 Java Edition - Version 20.0 [Build 8235]