package hvsock

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

Install

Dune Dependency

Authors

Maintainers

Sources

hvsock-3.0.1.tbz
sha256=41659fb404dd3c7b694e7e5ab450df7af4240f4592b5b7c356d1598dbd32cac4
sha512=4d355c58a86630dfe77ae084d93f23f2666bc46b0161128d99f51db286d0e49afc4f8130596b513b850c601fad8029e2e6dfc40d50cd854bf330c280a654e164

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

Module Flow_shutdown.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.