Tiny_httpd_io.Input
Input channel (byte source)
type t = {
input : bytes -> int -> int -> int;
Read into the slice. Returns 0
only if the channel is closed.
close : unit -> unit;
Close the input. Must be idempotent.
*)}
An input channel, i.e an incoming stream of bytes.
This can be a string
, an int_channel
, an Unix.file_descr
, a decompression wrapper around another input channel, etc.
val of_in_channel : ?close_noerr:bool -> Stdlib.in_channel -> t
val of_unix_fd : ?close_noerr:bool -> Unix.file_descr -> t
val input : t -> bytes -> int -> int -> int
Read into the given slice.
val close : t -> unit
Close the channel.