Method Stdio.Fd()->linger()
- Method linger
boollinger(int(-1..65535)|voidseconds)- Description
Set the socket linger behaviour on close().
- Parameter
seconds -1Reset to default behaviour. This typically means that close() will return immediately, but any buffered data will still be sent if possible.
0Terminate the connection immediately on close(), and discard any buffered data.
(1..65535)Have close() wait for at most
secondsseconds for any buffered data to be sent after which the connection is terminated.- Returns
Returns
1on success, and0(zero) on failure.- Note
This operation is only valid on sockets.
- Note
This function was not available in Pike 7.8.775 and earlier.
- See also