package piaf

  1. Overview
  2. Docs
type server := t
type t
val start : sw:Eio.Switch.t -> Eio_unix.Stdenv.base -> server -> t
val shutdown : t -> unit
val listen : sw:Eio.Switch.t -> address:Eio.Net.Sockaddr.stream -> backlog:int -> reuse_addr:bool -> reuse_port:bool -> domains:int -> shutdown_timeout:float -> Eio_unix.Stdenv.base -> connection_handler -> t

listen ~sw ?bind_to_address ~network ~port connection_handler starts a server for connection_handler. It is preferred to use start instead, which starts a server for a Piaf handler.

OCaml

Innovation. Community. Security.