package capnp
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7b67b28a097559cad5fba538afb108eefbb4ee24b30e3cfb9dcd387619652049
sha512=d2c7133e0269e1162fa3ba320699759978e92f2c1ee606ce25353c1651e8311a382ec4b9dc2b4a9f51666821ed2ebb55619053b11c8bcdff8b0daa0fd004a9cb
doc/capnp.unix/Capnp_unix/IO/WriteContext/index.html
Module IO.WriteContextSource
val create :
write:('a -> buf:string -> pos:int -> len:int -> int) ->
compression:Capnp.Codecs.compression_t ->
'a ->
'a tcreate ~write ~compression descr creates a new context for writing data to the specified descriptor. compression specifies the compression format, if any.
The semantics of the write function shall mimic that of Unix.single_write, attempting to write a substring from the buf and returning the number of bytes actually written.
enqueue_message context message places the message in the outgoing queue of the write context. No data will be written to the underlying descriptor.
bytes_remaining context obtains the number of unwritten bytes currently stored in the write context.
write context attempts to write some of the queued data to the underlying descriptor associated with the write context.
write_message context message places the message in the outgoing queue of the write context, then invokes write in a loop until all queued data has been written.