mirror of
https://github.com/zap-proto/ocaml-rpc.git
synced 2026-10-30 15:04:28 +00:00
This switches capnp-rpc from Lwt to Eio. One particularly nice side effect of this is that `Service.return_lwt` has gone, as there is no distinction now between concurrent and non-concurrent service methods.
14 lines
578 B
OCaml
14 lines
578 B
OCaml
open Auth
|
|
open Eio.Std
|
|
|
|
val connect_as_server :
|
|
[> Eio.Flow.two_way_ty | Eio.Resource.close_ty] r -> Auth.Secret_key.t option ->
|
|
(Endpoint.t, [> `Msg of string]) result
|
|
|
|
val connect_as_client :
|
|
[> Eio.Flow.two_way_ty | Eio.Resource.close_ty] r -> Auth.Secret_key.t Lazy.t -> Digest.t ->
|
|
(Endpoint.t, [> `Msg of string]) result
|
|
(** [connect_as_client underlying key digest] is an endpoint using flow [underlying].
|
|
If [digest] requires TLS, it performs a TLS handshake. It uses [key] as its private key
|
|
and checks that the server is the one required by [auth]. *)
|