package vchan-unix

  1. Overview
  2. Docs
module M : Vchan.S.ENDPOINT with type port = Vchan.Port.t
module type Cohttp_IO_S = sig ... end
module IO : Cohttp_IO_S with type 'a t = 'a Lwt.t and type ic = Lwt_io.input_channel and type oc = Lwt_io.output_channel
val open_client : domid:int -> port:Vchan.Port.t -> ?buffer_size:int -> unit -> (Lwt_io.input_channel * Lwt_io.output_channel) Lwt.t

open_client domid port ?buffer_size () creates a client connection to the server running on domid with port port. This call will block until communication is established and it is safe to pass traffic. The underlying vchan connection will be disconnected when the input_channel is closed. If a ?buffer_size is given then 4 buffers of this size will be created: 2 for reading (vchan + Lwt_io) and 2 for writing.

val open_server : domid:int -> port:Vchan.Port.t -> ?buffer_size:int -> unit -> (Lwt_io.input_channel * Lwt_io.output_channel) Lwt.t

open_server domid port ?buffer_size () creates a server connection to client domid with port port. If a ?buffer_size argument is given then 4 buffers of this size will be created: 2 for reading (vchan + Lwt_io) and 2 for writing.

OCaml

Innovation. Community. Security.