package capnp-rpc

  1. Overview
  2. Docs
Cap'n Proto is a capability-based RPC system with bindings for many languages

Install

dune-project
 Dependency

Authors

Maintainers

Sources

capnp-rpc-2.1.1.tbz
sha256=6e9675034c8eac5873ed511f9b968db5223278145bb02ac4a970053a53970a48
sha512=2e2eb8389071bdad3ceef1d15200bf28987f13319f754f4d1603828d0d79202b4de90a6eb294f12ee088c7e3b73755286fbe7076b8fd3d0b29644221e0e7e080

doc/capnp-rpc.proto/Capnp_rpc_proto/Cap_proxy/Make/argument-1-C/Wire/index.html

Module C.Wire

The core RPC logic can be used with different serialisation systems. The appropriate types should be provided here.

type request
type response
type 'a msg
module Path : sig ... end

A field in a message that refers to a capability.

module Request : S.WIRE_PAYLOAD with type t = request msg and type path := Path.t
module Response : sig ... end
val ref_leak_detected : int -> (unit -> unit) -> unit

ref_leak_detected thread_id fn is called when a promise or capability is GC'd while its ref-count is non-zero, indicating that resources may have been leaked. fn () will log a warning about this and free the resources itself. The reason for going via ref_leak_detected rather than calling fn directly is because the OCaml GC may detect the problem at any point (e.g. while we're sending another message). The implementation should arrange for fn to be called at a safe point in thread thread_id (e.g. when returning to the thread's main loop). Unit-tests may wish to call fn immediately to show the error and then fail the test.