package capnp-rpc

  1. Overview
  2. Docs
Module type
Class type
val builder : unit -> attachments

builder () is a fresh writable attachments array.

val cap : int -> attachments -> cap

cap i t is the capability at index i in t. The reference count is increased by one.

val clear_cap : attachments -> int -> unit

Replace cap at index i with null and dec_ref it.

val add_cap : attachments -> cap -> int

add_cap t cap stores cap in t. t must have been created by builder. Increases the ref-count on cap by one.

val release_caps : attachments -> unit

release_caps a decreases the ref-count of every capability in a.