class lingering_close :?preclose:unit -> unit -> Unix.file_descr ->object..end
Closes a file descriptor using the "lingering close" algorithm.
The optional preclose function is called just before Unix.close.
Usage:
while lc # lingering do lc # cycle ~block:true () done
method cycle : ?block:bool -> unit -> unitReads data from the file descriptor until EOF or until a fixed timeout
is over. Finally, the descriptor is closed. If block is set, the method
blocks until data is available. (Default: false)
method lingering : boolWhether the socket is still lingering
method fd : Unix.file_descrThe file descriptor