Module Proto.Ropen

Ropen completes a Topen request. After Ropen is received, the fid used in the Topen can be used in Twrite or Tread calls, according to the flags passed in the Topen request. The returned iounit is the maximum number of bytes of data that a server will handle for the file in a single request.

type t
val size : t -> int

The size of this message in bytes. It is identical to the length of the underlying I/O vector but is also encoded in the first 4 bytes of the message.

val code : int

The op code for this message.

val tag : t -> Tag.t

An identifier for this transaction. All in-flight requests on a given connection must have unique tags.

val of_iovec : Iovec.t -> t

of_iovec verifies a message from an I/O vector. No copying is done, and of_iovec only performs bounds checks. Modifying the underlying I/O vector will change the results when accessing message fields.

val qid : t -> Styx__.Types.Qid.t

Unique identifier for the opened file.

val iounit : t -> int

The maximum size of a read or write that will be completed in one request. Typically this should be the maximum number of bytes allowed according to the current 9P connection's msize value, but some servers can choose a lower iounit that aligns with its underlying storage features.

val alloc : Iovec.ring -> t
val commit : t -> tag:Tag.t -> iounit:int -> int