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

18 lines
706 B
OCaml

open Capnp_rpc.Std
type t = [`Echo_bb48258560861cec] Capability.t
val local : unit -> t
(** [local ()] is a capability to a new local echo service. *)
val ping : t -> ?slow:bool -> string -> string
(** [ping t msg] sends [msg] to [t] and returns its response.
If [slow] is given, the service will wait until [unblock] is called before replying. *)
val ping_result : t -> ?slow:bool -> string -> (string, [> `Capnp of Capnp_rpc.Error.t]) result
(** [ping t msg] sends [msg] to [t] and returns its response.
If [slow] is given, the service will wait until [unblock] is called before replying. *)
val unblock : t -> unit
(** [unblock t] tells the service to return any blocked ping responses. *)