module Netsys_polypipe:sig..end
exception Closed
type 'a polypipe
val create : int -> 'a polypipe * 'a polypipeval length : 'a polypipe -> intval eof : 'a polypipe -> boolval read : nonblock:bool -> 'a polypipe -> 'a optionNone means EOF. Possible Unix.unix_error codes:EAGAIN: the pipe is non-blocking, and there is no message in the
bufferEINTR: a signal arrivedClosed if the polypipe has been closed.val write : nonblock:bool -> 'a polypipe -> 'a option -> unitNone).
Possible Unix.unix_error codes:EAGAIN: the pipe is non-blocking, and there is no message in the
bufferEINTR: a signal arrivedEPIPE: it was tried to send a message after sending None.
Raises Closed if the polypipe has been closed.
val close : 'a polypipe -> unitNone.val set_read_notify : 'a polypipe -> (unit -> unit) -> unitset_read_notify pipe f: Sets that the function f is called
when the pipe becomes readable (or reaches eof). Only one such
function can be registered; any previous function is
overwritten. The function will be called from a different thread.val set_write_notify : 'a polypipe -> (unit -> unit) -> unitset_write_notify pipe f: Sets that the function f is called
when the pipe becomes writable (or reaches eof). Only one such
function can be registered; any previous function is
overwritten. The function will be called from a different thread.val read_descr : 'a polypipe -> Unix.file_descrThe caller has to close the descriptor after use.
Raises Closed if the polypipe has been closed.
val write_descr : 'a polypipe -> Unix.file_descrThe caller has to close the descriptor after use.
Raises Closed if the polypipe has been closed.
val set_exception : 'a polypipe -> exn -> unitwrite. If an exception already exists, it is not overwritten.
read will return EOF. Readers need to test for the exceptionw with
get_exception.
val get_exception : 'a polypipe -> exn optionmodule Debug:sig..end