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+087207370c685ccfa01d10830e6db3af2770247a
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 a value that indicates if the socket is trusted.
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.
AnyPort Wildcard port for VSock sockets.
SocketAddressSize The size, in bytes, of the sockaddr_vm structure, used to describe VSock socket addresses.

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