package hvsock

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t

A Hyper-V socket

val create : unit -> t

create () creates an unbound AF_HVSOCK socket

val bind : t -> Hvsock.sockaddr -> unit

bind t sockaddr binds socket to sockaddr

val listen : t -> int -> unit

listen t queue

val accept : t -> (t * Hvsock.sockaddr) Lwt.t

accept t accepts a single connection

val connect : t -> Hvsock.sockaddr -> unit Lwt.t

connect t sockaddr connects to a remote partition

val read : t -> Bytes.t -> int -> int -> int Lwt.t

read t buf offset len reads up to len bytes from t into buf starting at offset offset

val write : t -> Bytes.t -> int -> int -> int Lwt.t

write t buf offset len writes up to len bytes from t into buf starting at offset offset

val close : t -> unit Lwt.t

close t closes a socket

OCaml

Innovation. Community. Security.