package tiny_httpd

  1. Overview
  2. Docs

A backend that provides IO operations, network operations, etc.

This is used to decouple tiny_httpd from the scheduler/IO library used to actually open a TCP server and talk to clients. The classic way is based on Unix and blocking IOs, but it's also possible to use an OCaml 5 library using effects and non blocking IOs.

val init_addr : unit -> string

Initial TCP address

val init_port : unit -> int

Initial port

val get_time_s : unit -> float

Obtain the current timestamp in seconds.

val tcp_server : unit -> Tiny_httpd_io.TCP_server.builder

TCP server builder, to create servers that can listen on a port and handle clients.