Module Lwt_chan
: cooperative, Pervasives
-like, I/O functions
Note: the [root:Lwt_io] module deprecates this module.
make_in_channel read
creates an input channel from the read
function. read s ofs len
should (cooperatively) read len
bytes from
the source, and put them in s
, at offset ofs
, and return the number
of bytes effectively read. If provided, close
will be called by
close_in
. By default, close_in
does not do anything.
make_out_channel write
creates an output channel from the write
function. write s ofs len
should (cooperatively) write len
bytes from
s
, starting at offset ofs
, to the backend, and return the number of
bytes effectively written. If provided, close
will be called by
close_out
. By default, close_out
does not do anything.