Up

Module type S = Async_rpc_kernel.Transport_intf.Reader

Signature

type t
val sexp_of_t : t -> Sexplib.Sexp.t
val close : t -> unit Async_kernel.Std.Deferred.t
val is_closed : t -> bool
val read_forever : t -> on_message:(Core_kernel.Std.Bigstring.t -> pos:int -> len:int -> 'a Transport_intf.Handler_result.t) -> on_end_of_batch:(unit -> unit) -> ('a, [
| `Eof
| `Closed
]) Core_kernel.Std.Result.t Async_kernel.Std.Deferred.t

Start reading incoming messages and pass them to on_message, until it returns Stop _.

on_end_of_batch is called after processing a batch of messages, before waiting for the file descriptor to become readable again.