package tiny_httpd

  1. Overview
  2. Docs
Minimal HTTP server using good old threads

Install

Dune Dependency

Authors

Maintainers

Sources

0.7.tar.gz
md5=eaa23afea2f49c451875bfd57a4eb481
sha512=951d6f4b7ce9e4afece01a184d6900e0d5f0159b8727f4596744b01cb5e3d9a5ea0c0a02143e48af0f3c3ae56f6bebbf1963095ebcc49dbedc57aa9bdd1e4ab2

doc/tiny_httpd/Tiny_httpd/Byte_stream/index.html

Module Tiny_httpd.Byte_streamSource

Sourceval close : t -> unit
Sourceval empty : t
Sourceval of_chan : in_channel -> t

Make a buffered stream from the given channel.

Sourceval of_chan_close_noerr : in_channel -> t

Same as of_chan but the close method will never fail.

Sourceval of_bytes : ?i:int -> ?len:int -> bytes -> t

A stream that just returns the slice of bytes starting from i and of length len.

Sourceval of_string : string -> t
Sourceval iter : (bytes -> int -> int -> unit) -> t -> unit

Iterate on the chunks of the stream

  • since 0.3
Sourceval to_chan : out_channel -> t -> unit

Write the stream to the channel.

  • since 0.3
Sourceval with_file : string -> (t -> 'a) -> 'a

Open a file with given name, and obtain an input stream on its content. When the function returns, the stream (and file) are closed.

Sourceval read_line : ?buf:Buf_.t -> t -> string

Read a line from the stream.

  • parameter buf

    a buffer to (re)use. Its content will be cleared.

Sourceval read_all : ?buf:Buf_.t -> t -> string

Read the whole stream into a string.

  • parameter buf

    a buffer to (re)use. Its content will be cleared.

OCaml

Innovation. Community. Security.