package hvsock
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=e94afeaa1a8bdb8ea7e5b30ffc8ed476e5999c668a48e8c8e49a6a97ceda6cc9
md5=b5512ca72cbbd01d6e756264d6114020
doc/hvsock/Hvsock/Socket/index.html
Module Hvsock.Socket
Source
An interface for hypervisor sockets which hides as many of the differences between Linux, Windows and Mac as possible.
An operation cannot be performed on this platform
A socket address which can either be listened on or connected to.
Parse a URI as a socket address. This currently supports
- vsock://:80
- hvsock://<VM GUID>/3049197C-9A4E-4FBF-9367-97F792F16994
- hvsock://<VM name>/3049197C-9A4E-4FBF-9367-97F792F16994
- vsock://2:80/
- hyperkit://:80/Users/foo/Library/Containers/com.docker.docker/Data/vms/0
Expose the AF_HYPERV socket address, if one exists
Expose the AF_VSOCK socket address, if one exists
Expose the hyperkit socket address, if one exists
include Af_common.S with type sockaddr := sockaddr and type t = Unix.file_descr
listen socket queue_length
sets the socket to listening mode with the given maximum queue length
connect ?timeout_ms fd sockaddr
connects to a remote socket. On Windows the raw connect call can block forever if the server is not running when the call is executed (even if the server starts up afterwards) there is a default timeout of 300ms. On timeout this will raise Unix_error(Unix.ETIMEDOUT)
Read into a buffer, returning the number of bytes written