package tiny_httpd
Module IO.InputSource
Input channel (byte source)
include module type of struct include Iostream.In_buf end
A mixin to implement a buffered input by only providing a refill method. Add a close method and it's good to go.
Create a new buffered input stream.
Read from the given buffer.
Wrap a standard input channel.
fill_buffer bic returns a slice into bic's internal buffer, and ensures it's empty only if bic.ic is empty.
Make a buffered version of the input stream.
consume bic n consumes n bytes from bic. Precondition: n <= get_len bic, ie. one cannot consume bytes that have not yet been obtained via fill_buffer or fill_and_get.
Cast into a In.t. This doesn't allocate.
Read the whole content into the given buffer.
input_all ic reads the whole content of ic into a string.
Copy the entire stream into the given output.
Read a line from the input. Return None if the stream is empty.
Read into the given slice.
Close the channel.
Read exactly len bytes.
Read n bytes from the input into bytes.
val reading_exactly_ :
skip_on_close:bool ->
close_rec:bool ->
size:int ->
bytes:bytes ->
t ->
tnew stream with maximum size max_size.
New stream that consumes exactly size bytes from the input. If fewer bytes are read before close is called, we read and discard the remaining quota of bytes before close returns.
Output a stream using chunked encoding
print a stream as a series of chunks