Networking.CapTPSharing capabilities over a network link.
val connect : 
  sw:Eio.Switch.t ->
  restore:Restorer.t ->
  ?tags:Logs.Tag.set ->
  Endpoint.t ->
  tconnect ~sw ~restore ~switch endpoint is fresh CapTP protocol handler that sends and receives messages using endpoint. restore is used to respond to "Bootstrap" messages. If the connection fails then endpoint will be disconnected. You must call run to run the loop handling messages.
val run : t -> unitrun t reads and handles incoming messages until the connection is finished.
val bootstrap : t -> Restorer.Id.t -> 'a Capnp_rpc.Std.Capability.tbootstrap t object_id is the peer's bootstrap object object_id, if any. Use object_id = "" for the main, public object.
val disconnect : t -> Capnp_rpc.Exception.t -> unitdisconnect reason closes the connection, sending reason to the peer to explain why. Capabilities and questions at both ends will break, with reason as the problem.
val dump : t Fmt.tdump dumps the state of the connection, for debugging.