package capnp-rpc-mirage

  1. Overview
  2. Docs
type flow = Stack.TCPV4.flow
type 'a io = 'a Lwt.t
type io_addr = Ipaddr.V4.t * int
type ns_addr = [ `TCP | `UDP ] * io_addr
type stack = Stack.t
val create : ?rng:(int -> Cstruct.t) -> ?nameserver:ns_addr -> stack -> t
val nameserver : t -> ns_addr
val rng : t -> int -> Cstruct.t
val connect : ?nameserver:ns_addr -> t -> (flow, [> `Msg of string ]) result io
val send : flow -> Cstruct.t -> (unit, [> `Msg of string ]) result io
val recv : flow -> (Cstruct.t, [> `Msg of string ]) result io
val close : flow -> unit io
val bind : 'a io -> ('a -> 'b io) -> 'b io
val lift : 'a -> 'a io
OCaml

Innovation. Community. Security.