package hvsock

  1. Overview
  2. Docs

Parameters

module Time : Mirage_time_lwt.S
module Fn : Lwt_hvsock.FN

Signature

type error = [
  1. | `Unix of Unix.error
]
include Mirage_flow_lwt.S with type error := error
type 'a io = 'a Lwt.t
val pp_error : error Fmt.t
type write_error = private [>
  1. | Mirage_flow.write_error
]
val pp_write_error : write_error Fmt.t
type buffer = Cstruct.t
type flow
val read : flow -> (buffer Mirage_flow.or_eof, error) Pervasives.result io
val write : flow -> buffer -> (unit, write_error) Pervasives.result io
val writev : flow -> buffer list -> (unit, write_error) Pervasives.result io
val close : flow -> unit io
val connect : ?message_size:int -> ?buffer_size:int -> Hvsock.t -> flow

Construct a flow given a Hyper-V socket connection. ?message_size allows the maximum send/recv size to be limited. ?buffer_size controls how much buffering is placed over the socket.

Note the buffer handling of this flow is different to normal: `read` and `readv` will retain references to the passed buffers. They must not be used again by the calling application.

val read_into : flow -> Cstruct.t -> (unit Mirage_flow.or_eof, error) Pervasives.result Lwt.t
OCaml

Innovation. Community. Security.