package shared-memory-ring-lwt

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

The (server) back-end connection to the shared ring.

type ('a, 'b) t

Type of a backend connection to a shared ring. 'a is the response type, and 'b is the request id type (e.g. int or int64).

val init : ('b -> string) -> ('a, 'b) Ring.Rpc.Back.t -> ('a, 'b) t

init string_of_id ring initialises a stateful lwt server attached to ring.

val push_response : ('a, 'b) t -> (unit -> unit) -> (Ring.buf -> unit) -> unit

push_response t notify_fn fn finds a free slot and applies it to fn, signalling the client via notify_fn that a response is ready.

OCaml

Innovation. Community. Security.