package tiny_httpd

  1. Overview
  2. Docs

Module type Tiny_httpd_server.IO_BACKENDSource

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.

Sourceval init_addr : unit -> string

Initial TCP address

Sourceval init_port : unit -> int

Initial port

Sourceval get_time_s : unit -> float

Obtain the current timestamp in seconds.

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