Vchan_lwt_unixmodule M : Vchan.S.ENDPOINT with type port = Vchan.Port.tmodule type Cohttp_IO_S = sig ... endmodule IO :
Cohttp_IO_S
with type 'a t = 'a Lwt.t
and type ic = Lwt_io.input_channel
and type oc = Lwt_io.output_channelval open_client :
domid:int ->
port:Vchan.Port.t ->
?buffer_size:int ->
unit ->
(Lwt_io.input_channel * Lwt_io.output_channel) Lwt.topen_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.topen_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.