and write_error = private [>
The type for write errors.
type buffer = Cstruct.t
The type for memory buffers.
type 'a io = 'a Lwt.t
The type for potentially blocking I/O operation
create flow allocates send and receive buffers and associates them with the given unbuffered
Reads a single character from the channel, blocking if there is no immediately available input data.
read_some ?len t reads up to
len characters from the input channel and at most a full
len is not specified, it reads all available data and returns that buffer.
read_exactly len t reads
len bytes from the channel
t or fails with
read_line t reads a line of input, which is terminated either by a CRLF sequence, or the end of the channel (which counts as a line).
val write_char : t -> char -> unit
write_char t ch writes a single character to the output channel.
val write_string : t -> string -> int -> int -> unit
write_string t buf off len writes
len bytes from a string
buf, starting from from offset
write_buffer t buf copies the buffer to the channel's output buffer. The buffer should not be modified after being written, and it will be recycled into the buffer allocation pool at some future point.
val write_line : t -> string -> unit
write_line t buf writes the string
buf to the output channel and append a newline character afterwards.
flush t flushes the output buffer and block if necessary until it is all written out to the flow.