mirage-channel

Buffered channels for MirageOS FLOW types
Description

Channels are buffered reader/writers built on top of unbuffered FLOW implementations.

Example:

module Channel = Channel.Make(Flow)
...
Channel.read_exactly ~len:16 t
>>= fun bufs -> (* read header of message *)
let payload_length = Cstruct.(LE.get_uint16 (concat bufs) 0) in
Channel.read_exactly ~len:payload_length t
>>= fun bufs -> (* payload of message *)

(* process message *)

Channel.write_buffer t header;
Channel.write_buffer t payload;
Channel.flush t
>>= fun () ->

mirage-channel is distributed under the ISC license.

Install
Published
14 Jun 2017
Authors
Maintainers
Sources
mirage-channel-3.1.0.tbz
md5=942d02ee627c0bae75ce5e7e16c1153e
Dependencies
mirage-flow >= "1.2.0" & < "2.0.0"
jbuilder >= "1.0+beta10"
ocaml >= "4.02.3"
Reverse Dependencies
docteur-unix < "0.0.3"
mirage-types >= "3.0.0" & < "3.7.1"
vpnkit >= "0.1.1"
Conflicts
tcpip < "3.0.0"