package lo

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Operations for creating servers.

type t

A server.

exception Stopped

Raised when an operation is performed on a stopped server.

val create : int -> (string -> Message.data array -> unit) -> t

Create a server listening on given port with handler function taking as agument the path and messages received.

val recv : t -> unit

Recive messages and pass them to the handler. This function is blocking until a message is received.

val stop : t -> unit

Stop the server. No operation on this server should be performed afterward (otherwise, the exception Stopped is raised).

OCaml

Innovation. Community. Security.