package lwt-parallel

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

Serialization Protocols.

val define : put:(Lwt_io.output_channel -> 'a -> unit Lwt.t) -> get:(Lwt_io.input_channel -> 'a Lwt.t) -> 'a io

define ~put ~get defines a new serialization protocol.

The put function is responsible for writing the messages to the channel. The get function is responsible for reading the messages from the channel.

val put : 'a io -> Lwt_io.output_channel -> 'a -> unit Lwt.t

put io chan x uses protocol io to write x to chan.

val get : 'a io -> Lwt_io.input_channel -> 'a Lwt.t

get io chan uses protocol io to read a message from chan.

val marshaling : 'a io

marshalling io uses the Marshal module to serialize messages.

OCaml

Innovation. Community. Security.