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.
18 lines
706 B
OCaml
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. *)
|