package ojs_base

  1. Overview
  2. Docs

Server-side utilities.

module J = Yojson.Safe
module SMap : Stdlib.Map.S with type key = string
val mk_msg_of_wsdata : (J.t -> ('a, string) Stdlib.result) -> string -> 'a option
val mk_send_msg : ('a -> string) -> (Websocket.Frame.t -> unit Lwt.t) -> 'a -> unit Lwt.t
val mk_msg_stream : (string -> 'a option) -> Websocket.Frame.t Lwt_stream.t -> 'a Lwt_stream.t
val handle_messages : (string -> 'a option) -> ('b -> string) -> (('b -> unit Lwt.t) -> unit Lwt.t) -> Websocket.Frame.t Lwt_stream.t -> (Websocket.Frame.t -> unit Lwt.t) -> unit Lwt.t
module type P = sig ... end
module type S = sig ... end