package capnp-rpc-lwt

  1. Overview
  2. Docs

An actor in the CapTP network. A vat is a collection of objects that can call each other directly. A vat may be connected to other vats over CapTP network connections. Typically an application will create only a single vat. See the Capnp_rpc_unix module for a higher-level API.

type t

A local vat.

val create : ?switch:Lwt_switch.t -> ?bootstrap:'a Capability.t -> unit -> t

create ~switch ~bootstrap () is a new vat that offers bootstrap to its peers. The vat takes ownership of bootstrap, and will release it when the switch is turned off. Turning off the switch will also disconnect any active connections.

val connect : t -> Endpoint.t -> CapTP.t

connect t endpoint runs the CapTP protocol over endpoint, which is a connection to another vat.

OCaml

Innovation. Community. Security.