package tiny_httpd
Module Tiny_httpd_io.OutputSource
Output channel (byte sink)
Source
type t = {output_char : char -> unit;(*Output a single char
*)output : bytes -> int -> int -> unit;(*Output slice
*)flush : unit -> unit;(*Flush underlying buffer
*)close : unit -> unit;(*Close the output. Must be idempotent.
*)
}An output channel, ie. a place into which we can write bytes.
This can be a Buffer.t, an out_channel, a Unix.file_descr, etc.
of_out_channel oc wraps the channel into a Output.t.
of_buffer buf is an output channel that writes directly into buf. flush and close have no effect.