package moonpool-lwt

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = Lwt_io.server
val establish_lwt : ?backlog:int -> ?no_close:bool -> runner:Moonpool.Runner.t -> Unix.sockaddr -> (Unix.sockaddr -> Lwt_io.input_channel -> Lwt_io.output_channel -> unit) -> t

establish ~runner addr handler runs a TCP server in the Lwt thread. When a client connects, a moonpool fiber is started on runner to handle it.

val establish : ?backlog:int -> ?no_close:bool -> runner:Moonpool.Runner.t -> Unix.sockaddr -> (Unix.sockaddr -> IO_in.t -> IO_out.t -> unit) -> t

Like establish_lwt but uses IO to directly handle reads and writes on client sockets.

val shutdown : t -> unit

Shutdown the server

OCaml

Innovation. Community. Security.