TsgcTCPClient › Properties › LingerState
Configures the SO_LINGER socket option used when the client closes the connection.
property LingerState: Integer read FLingerState write FLingerState;
-1 (system default)
A value of -1 leaves SO_LINGER untouched and uses the operating-system default (close() returns immediately while the kernel drains any queued bytes in the background). Set LingerState to 0 to force an abortive close that discards any unsent data and sends a TCP RST; a positive number of seconds enables the linger option so that close() blocks until the queued data has been transmitted or the specified timeout elapses.
oTCP := TsgcTCPClient.Create(nil);
oTCP.Host := 'www.esegece.com';
oTCP.Port := 2053;
oTCP.LingerState := 0;
oTCP.Active := true;