mirage-qubes

Implementations of various Qubes protocols for MirageOS
Library mirage-qubes
Module Qubes . Msg_chan . Make

Parameters

Signature

include S.MSG_CHAN
type t
val recv : t -> (Cstruct.t * Cstruct.t) S.or_eof Lwt.t

Receive one packet (header and body)

val recv_fixed : t -> int -> Cstruct.t S.or_eof Lwt.t

Receive one packet of known size (no header)

val recv_raw : t -> Cstruct.t S.or_eof Lwt.t

Read a chunk of data from the stream. Blocks if no data is available yet.

val send : t -> Cstruct.t list -> unit S.or_eof Lwt.t

Send one or more packets (takes the mutex)

val client : domid:int -> port:Vchan_xen.port -> unit -> t Lwt.t

Create a client

val server : domid:int -> port:Vchan_xen.port -> unit -> t Lwt.t

Create a server

val disconnect : t -> unit Lwt.t