package async_extra

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module type Name = sig ... end
module Version : sig ... end
module type Versions = sig ... end
type 'a marshal_fun = 'a -> Core.Bigsubstring.t option
type 'a unmarshal_fun = Core.Bigsubstring.t -> 'a option
module type Datumable = sig ... end

This module describes the type of a given direction of message flow. For example it might describe the type of messages from the client to the server.

module type Datum = sig ... end
module type Mode = sig ... end

This module may be used to implement modes for clients/servers. A common scheme is to have two modes, Test, and Production, and to want to maintain the invariant that clients in mode Test may not talk to servers in mode Production, and that clients in mode Production may not talk to servers in mode Test. Versioned connection will check that the mode of the client is the same as the mode of the server.

module type Arg = sig ... end
module Read_result : sig ... end
module Server_msg : sig ... end

The messages which the code using this library on the server side needs to process. That is, messages received from Clients or otherwise triggered by a Client connection behavior.

module Client_msg : sig ... end

The messages which the code using this library on the client side needs to process. That is, messages received from Server, or caused by a state change of a connection to Server.

module type S = sig ... end
module Repeater_error : sig ... end
module Repeater_hook_result : sig ... end
val protocol_version : [ `Prod | `Test ] Core.ref
module Make (Z : Arg) : S with module To_server_msg = Z.To_server_msg and module To_client_msg = Z.To_client_msg and module Client_name = Z.Client_name and module Server_name = Z.Server_name

Repeater is used in the cases where we want to inspect and possible alter the flow between a client and a server without having to change either the client or the server or the protocol between them. It is written with efficiency in mind which dictated some design decisions.

module Datumable_of_binable : sig ... end

Helpers to make your types Datumable if they are binable. Works with up to 5 versions (easily extensible to more)