This is preliminary documentation and is subject to change.

VSock Class

Provides constants and helper methods for working with Linux VSock sockets.

Definition

Namespace: Ookii.VmSockets
Assembly: Ookii.VmSockets (in Ookii.VmSockets.dll) Version: 1.0.0-preview+f8696045525769a78b927dc73288e964721869c8
C#
public static class VSock
Inheritance
Object    VSock

Remarks

  Important

The functionality defined in this class is only available on Linux kernels that support the AF_VSOCK address family.

  Important

Due to limitations in the Sockets API on the Linux version of .Net, this class is only available for .Net 8.0 and later.

Methods

Create Creates a new VSock socket.
GetBufferMaxSize Gets the maximum buffer size for a stream socket.
GetBufferMinSize Gets the minimum buffer size for a stream socket.
GetBufferSize Gets the buffer size for a stream socket.
GetConnectTimeout Gets the connect timeout for a stream socket.
GetLocalCid Gets the CID of the local machine.
GetPeerHostVmId Gets the host-specific VM ID of the peer.
GetTrusted Gets the host-specific VM ID of the peer.
SetBufferMaxSize Sets the maximum buffer size for a stream socket.
SetBufferMinSize Sets the minimum buffer size for a stream socket.
SetBufferSize Sets the buffer size for a stream socket.
SetConnectTimeout Sets the connect timeout for a stream socket.

Fields

AddressFamily The address family for VSock sockets, also known as AF_VSOCK.
Any Wildcard CID or port for VSock sockets.
Host Host address for VSock sockets.
Hypervisor Destination CID used to refer to the hypervisor.
Local Loopback address for VSock sockets.
SocketAddressSize The size of a sockaddr_vm structure.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also