mirage-channel-lwt
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.
- Homepage: https://github.com/mirage/mirage-channel
- Issue: https://github.com/mirage/mirage-channel/issues
- Contact:
<mirageos-devel@lists.xenproject.org>
Install
copied = false, 2000)"
:class="{ 'border-gray-700': !copied, 'text-gray-100': !copied, 'focus:ring-orange-500': !copied, 'focus:border-orange-500': !copied, 'border-green-600': copied, 'text-green-600': copied, 'focus:ring-green-500': copied, 'focus:border-green-500': copied }">
- Published
- 14 Jun 2017
- Authors
- Maintainers
Sources
Dependencies
io-page-unix
with-test
alcotest
with-test & < "1.4.0"
lwt
>= "2.4.7"
mirage-channel
>= "3.1.0" & < "4.0.0"
mirage-flow-lwt
>= "1.2.0"
jbuilder
>= "1.0+beta10"
ocaml
>= "4.02.3"
Reverse Dependencies
cohttp-mirage
< "2.4.0"
dns-forward
>= "0.9.0"
git-mirage
< "2.1.2"
mirage-http
>= "3.0.0"
mirage-types-lwt
>= "3.0.0" & < "3.7.1"
protocol-9p
>= "0.9.0" & < "2.0.2"
protocol-9p-unix
< "2.0.2"
Conflicts
tcpip
< "2.5.0"