package tiny_httpd
Module IO.OutputSource
Output channel (byte sink)
include module type of struct include Iostream.Out_buf end
An output stream, ie. a place into which we can write bytes, with a buffer to amortize the cost of operations.
Source
val create :
?flush:(unit -> unit) ->
?close:(unit -> unit) ->
output_char:(char -> unit) ->
output:(bytes -> int -> int -> unit) ->
unit ->
tCreate a new output stream from raw components.
Make a bufferized output from a non bufferized output+close.
Wrap an out channel.
of_buffer buf is an output channel that writes directly into buf. flush and close have no effect.
Source
class open_file : ?close_noerr:bool -> ?mode:int -> ?flags:open_flag list -> string ->
t_seekableSource
val open_file :
?close_noerr:bool ->
?mode:int ->
?flags:open_flag list ->
string ->
t_seekableopen_file file creates an out stream writing into the given file.
Source
val with_open_file :
?close_noerr:bool ->
?mode:int ->
?flags:open_flag list ->
string ->
(t_seekable -> 'a) ->
'aEnsure the bytes written so far are indeed written to the underlying storage/network socket/… and are not just sitting in a buffer.
Output a series of lines, each terminated by '\n'.
tee ocs is an output that accepts bytes and writes them to every output in ocs. When closed, it closes all elements of oc.
Source
class of_unix_fd : ?close_noerr:bool option -> closed:bool ref -> buf:Slice.t -> Unix.file_descr ->
t