Transport.WriterSourceinclude module type of struct include Async_rpc_kernel.Rpc.Transport.Writer endinclude SBecomes 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
flushed t returns a deferred that must become determined when all prior sent messages are delivered.
It must be OK to call flushed t after t has been closed.
ready_to_write t becomes 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 = flushed is an acceptable implementation.
All the following functions send exactly one message.
val send_bin_prot :
t ->
'a Core.Bin_prot.Type_class.writer ->
'a ->
unit Async_rpc_kernel__.Transport_intf.Send_result.tval send_bin_prot_and_bigstring :
t ->
'a Core.Bin_prot.Type_class.writer ->
'a ->
buf:Core.Bigstring.t ->
pos:int ->
len:int ->
unit Async_rpc_kernel__.Transport_intf.Send_result.tval send_bin_prot_and_bigstring_non_copying :
t ->
'a Core.Bin_prot.Type_class.writer ->
'a ->
buf:Core.Bigstring.t ->
pos:int ->
len:int ->
unit Async_kernel.Deferred.t Async_rpc_kernel__.Transport_intf.Send_result.tSame as send_bin_prot_and_bigstring but the bigstring can't be modified until the returned deferred becomes determined. This can be used to avoid copying the bigstring.
val transfer :
t ->
?max_num_values_per_read:int ->
'a Async_kernel.Pipe.Reader.t ->
('a -> unit) ->
unit Async_kernel.Deferred.tThis function is similar to Async_unix.Writer.transfer, except that it doesn't wait on Pipe.upstream_flushed when the writer is closed.