package vchan

  1. Overview
  2. Docs

Parameters

module A : S.EVENTS
module M : S.MEMORY

Signature

type t

Type of a vchan endpoint.

type port = Port.t

Type of a vchan port name.

val server : domid:int -> port:port -> ?read_size:int -> ?write_size:int -> unit -> t Lwt.t
val client : domid:int -> port:port -> unit -> t Lwt.t
include Mirage_flow.S with type flow = t
type error
val pp_error : error Fmt.t
type nonrec write_error = private [>
  1. | Mirage_flow.write_error
]
val pp_write_error : write_error Fmt.t
type flow = t
val read : flow -> (Cstruct.t Mirage_flow.or_eof, error) Stdlib.result Lwt.t
val write : flow -> Cstruct.t -> (unit, write_error) Stdlib.result Lwt.t
val writev : flow -> Cstruct.t list -> (unit, write_error) Stdlib.result Lwt.t
val shutdown : flow -> [ `read | `read_write | `write ] -> unit Lwt.t
val close : flow -> unit Lwt.t
OCaml

Innovation. Community. Security.