package hvsock

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

hvsock-3.1.0.tbz
sha256=c3dc439a50b2b83dc584b20726a1311ca52187792613e9cf441c39da51ef7407
sha512=cd631f190c63dabd8151e51715d048c828aa9a8207661a6b06c5b7754de030ebec81f06d6c545afc3b7fc2637466ebe4ac5f205e4cbad672591f79f9c5366242

doc/hvsock.lwt-unix/Hvsock_lwt_unix/Flow/Socket/index.html

Module Flow.SocketSource

Sourcetype t

A socket which supports I/O via Lwt

A socket address

Sourceval string_of_sockaddr : sockaddr -> string
Sourceval create : unit -> t

create () creates an unbound hypervisorsocket

Sourcetype fd

A low-level file descriptor

Sourceval to_fd : t -> fd option

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

Sourceval bind : t -> sockaddr -> unit

bind t sockaddr binds socket to sockaddr

Sourceval listen : t -> int -> unit

listen t queue

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

accept t accepts a single connection

Sourceval connect : ?timeout_ms:int -> t -> 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

Sourceval shutdown_read : t -> unit Lwt.t

shutdown_read t closes the read side of the socket

Sourceval shutdown_write : t -> unit Lwt.t

shutdown_write t closes the write side of the socket

OCaml

Innovation. Community. Security.