Up

Module Direct_stream_writer

A Direct_stream_writer.t is a simple object for responding to a Pipe_rpc query.

Signature

type 'a t
val write : 'a t -> 'a -> [
| `Flushed of unit Async_kernel.Std.Deferred.t
| `Closed
]

write t x returns `Closed if t is closed, or `Flushed d if it is open. In the open case, d is determined when the message has been flushed from the underlying Transport.Writer.t.

val write_without_pushback : 'a t -> 'a -> [
| `Ok
| `Closed
]
val close : _ t -> unit
val closed : _ t -> unit Async_kernel.Std.Deferred.t
val is_closed : _ t -> bool