Module type Transport_intf.Writer
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val close : t -> unit Async_kernel.Deferred.tval is_closed : t -> boolval monitor : t -> Async_kernel.Monitor.tval bytes_to_write : t -> intval stopped : t -> unit Async_kernel.Deferred.tBecomes determined when it is no longer possible to send message using this writer, for instance when the writer is closed or the consumer leaves.
The result of this function is cached by
Rpc.Transport
val flushed : t -> unit Async_kernel.Deferred.tflushed treturns a deferred that must become determined when all prior sent messages are delivered.It must be OK to call
flushed tafterthas been closed.
val ready_to_write : t -> unit Async_kernel.Deferred.tready_to_write tbecomes determined when it is a good time to send messages again. Async RPC calls this function after sending a batch of messages, to avoid flooding the transport.Using
let ready_to_write = flushedis an acceptable implementation.
val send_bin_prot : t -> 'a Bin_prot.Type_class.writer -> 'a -> unit Send_result.tval send_bin_prot_and_bigstring : t -> 'a Bin_prot.Type_class.writer -> 'a -> buf:Core_kernel.Bigstring.t -> pos:int -> len:int -> unit Send_result.tval send_bin_prot_and_bigstring_non_copying : t -> 'a Bin_prot.Type_class.writer -> 'a -> buf:Core_kernel.Bigstring.t -> pos:int -> len:int -> unit Async_kernel.Deferred.t Send_result.tSame as
send_bin_prot_and_bigstringbut the bigstring can't be modified until the returned deferred becomes determined. This can be used to avoid copying the bigstring.