package hvsock

  1. Overview
  2. Docs
type vmid =
  1. | Wildcard
    (*

    Any partition

    *)
  2. | Children
    (*

    Any child partition

    *)
  3. | Loopback
    (*

    The same partition

    *)
  4. | Parent
    (*

    The parent partition

    *)
  5. | Id of string
    (*

    A specific VM id

    *)
val string_of_vmid : vmid -> string
type sockaddr = {
  1. vmid : vmid;
    (*

    identifies a partition

    *)
  2. serviceid : string;
    (*

    identifies a service

    *)
}

An AF_HVSOCK socket address

val create : unit -> Unix.file_descr

create () creates an unbound AF_HVSOCK socket

val bind : Unix.file_descr -> sockaddr -> unit

bind socket sockaddr binds socket to sockaddr

accept fd accepts a single connection

val connect : Unix.file_descr -> sockaddr -> unit

connect fd sockaddr connects to a remote partition. Note this has been observed to block forever if the server is not running when this call is executed, even if the server starts up afterwards. The workaround seems to be to close the fd and try again.