package hvsock

  1. Overview
  2. Docs
Bindings for Hyper-V AF_VSOCK

Install

Dune Dependency

Authors

Maintainers

Sources

1.0.2.tar.gz
sha256=93e9bba076c30b9a09b96b1a81a7d7fe9361bbcf713980d0a510cae7c65dbfe0
md5=d3ec27d96076075a6d2f949cc8ef3d32

doc/hvsock.lwt/Flow_lwt_hvsock/Make/Hvsock/index.html

Module Make.HvsockSource

Sourcetype t

A Hyper-V socket

Sourceval create : unit -> t

create () creates an unbound AF_HVSOCK socket

Sourceval to_fd : t -> Unix.file_descr option

to_fd t returns the wrapped file descriptor. Note this only supports blocking I/O

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

bind t sockaddr binds socket to sockaddr

Sourceval listen : t -> int -> unit

listen t queue

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

accept t accepts a single connection

Sourceval connect : ?timeout_ms:int -> t -> Hvsock.sockaddr -> unit Lwt.t

connect ?timeout_ms t sockaddr connects to a remote partition

Sourceval read : t -> Cstruct.t -> int Lwt.t

read t buf reads as many bytes as available into buf returning the number of bytes read.

Sourceval write : t -> Cstruct.t -> int Lwt.t

write t buf writes as many bytes from buf to t as will currently fit inside t's internal buffer, and return the number of bytes written

Sourceval close : t -> unit Lwt.t

close t closes a socket

OCaml

Innovation. Community. Security.