package protocol-9p

  1. Overview
  2. Docs
An implementation of the 9p protocol in pure OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

protocol-9p-2.1.0.tbz
sha256=28bace4c680708495bf3f8c936ade387870887c39c507318ecab456bf8824845
sha512=5c4a421211e84ddc2a4588d3d7d1979de83e32e8e5cde926ea0c93272720b67f009ead0ad51d087a62bffbad884390f02e030752c435f442115ee82ce932b741

doc/protocol-9p/Protocol_9p/Response/Read/index.html

Module Response.ReadSource

Sourcetype t = {
  1. data : Cstruct.t;
}

The payload of a Read response

include Sexplib0.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval sizeof_header : int

The size of only the header

Sourceval sizeof : t -> int

The size of a buffer needed to hold t

Sourceval read : Cstruct.t -> (t * Cstruct.t, [ `Msg of string ]) result

Read a t from the given buffer and return it, along with the unused remainder of the buffer. If the buffer cannot be parsed then return an error.

Sourceval write : t -> Cstruct.t -> (Cstruct.t, [ `Msg of string ]) result

Write a t into the given buffer. If the buffer is too small, then return an error. Return the unused remainder of the buffer.