Files
Thomas Leonard 48d675b10e Initial Eio port
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.
2024-11-16 12:09:07 +00:00

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]. *)