package capnp-rpc-lwt

  1. Overview
  2. Docs
type +'a t

An off-line (persistent) capability reference.

A sturdy ref contains all the information necessary to get a live reference to a service:

  • The network address of the hosting vat (e.g. TCP host and port)
  • A way to authenticate the hosting vat (e.g. a fingerprint of the vat's public key)
  • A way to identify the target service within the vat and prove permission to access it (e.g. a "Swiss number")

connect t returns a live reference to t's service.

val connect_exn : 'a t -> 'a Capability.t Lwt.t

connect_exn is a wrapper for connect that returns a failed Lwt thread on error.

reader accessor is a field accessor for reading a sturdy ref. e.g. if sr_get is a generated field accessor for an AnyPointer field, then reader Reader.Struct.sr_get is an accessor that treats it as a SturdyRef field. todo: This should really return a sturdy ref, not a URI, but that requires a change to the spec to add a sturdy ref cap-descriptor table entry type.

builder setter converts a generated AnyPointer field setter setter to a SturdyRef setter. Use it to add a SturdyRef to a message with builder Params.sr_get params sr.

val cast : 'a t -> 'b t
OCaml

Innovation. Community. Security.