package capnp
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7a6b0e4dbbe6d246336f248c69f719fd372bb8d51805822ea123983c3181c17e
sha512=d8ecf1d6481edab02fd8cc7dc269ee0c357a1858f4434adacdd1f2af9d528c7304e3e467faa1273ebb8f6a452b80b5822cbddfcc4534229bd0edca24a70a5833
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.