Module Proto.Twrite
A Twrite request provides data to be recorded in an open file at a given offset.
val offset : t -> int
The offset at which to start writing data. If the file is open in append-only mode, this field is ignored.
val offset64 : t -> int64
The offset, as a newly allocated int64.
val alloc : Iovec.t -> tag:Tag.t -> fid:Fid.t -> offset:int -> max:int -> t
alloc iov ~max
writes and returns aTwrite
message toiov
with a payload of up tomax
bytes. It does not populate or clear the payload. The caller must filldata msg
and usecommit
to update the message's count header. Care must be taken to avoid sending the uninitialized message.
val commit : t -> count:int -> int
commit m ~count
updates the message'scount
field and returns the updated size of the message.