package colombe

  1. Overview
  2. Docs

Parameters

Signature

type 's state = 's State.t
type event =
  1. | Accept
  2. | Recv : 'x Protocol.t * 'x -> event
  3. | Send : 'x Protocol.t -> event
  4. | Write of int
  5. | Read of int
  6. | Close
type action =
  1. | Send : 'x Protocol.t * 'x -> action
  2. | Recv : 'x Protocol.t -> action
  3. | Write of {
    1. buf : string;
    2. off : int;
    3. len : int;
    }
  4. | Read of {
    1. buf : bytes;
    2. off : int;
    3. len : int;
    }
  5. | Close
type 's t
type 's transition = 's state -> event -> (action * 's state, Protocol.error * 's state) result
val send : 'x Protocol.t -> 'x -> action
val recv : 'x Protocol.t -> action
val write : buf:string -> off:int -> len:int -> action
val read : buf:bytes -> off:int -> len:int -> action
val run : 's t -> ctx -> event -> ('s state, Protocol.error) process
val make : init:'s state -> 's transition -> 's t
OCaml

Innovation. Community. Security.