Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Shuttle.Output_channel
SourceAlternative to Async_unix.Writer, based on the low latency transport in async_rpc.
val create :
?initial_buffer_size:int ->
?write_timeout:Core.Time_ns.Span.t ->
Async_unix.Fd.t ->
t
create ?initial_buffer_size ?max_buffer_size ?write_timeout fd
creates a new writer.
The writer doesn't flush automatically and the user is responsible for calling flush
, which triggers a write system call if needed.
write_bigstring
copies the bigstring into the channel's internal buffer. It is safe to modify the bigstring once write_bigstring
returns.
write_string
copies the string into the channel's internal buffer. The string will surface the next time the writer schedules a write.
close
will close the underlying file descriptor after waiting for the writer to be flushed.
flushed t f
deferred that will get resolved when all prior writes have finished.