module Lwt_chan: sig..end
Module Lwt_chan: cooperative, Pervasives-like, I/O functions
Note: the Lwt_io module deprecates this module.
type in_channel = Lwt_io.input_channel
Cooperative input channels ¶
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.
Cooperative output channels ¶
type out_channel = Lwt_io.output_channel
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.