This is preliminary documentation and is subject to change.

VSockCreate Method

Creates a new VSock socket.

Definition

Namespace: Ookii.VmSockets
Assembly: Ookii.VmSockets (in Ookii.VmSockets.dll) Version: 1.0.0-preview+f8696045525769a78b927dc73288e964721869c8
C#
public static Socket Create(
	SocketType type
)

Parameters

type  SocketType
One of the SocketType values.

Return Value

Socket
The VSock socket.

Remarks

On the Linux version of .Net, the Socket(AddressFamily, SocketType, ProtocolType) constructor verifies that the address family is one of the known supported members of the AddressFamily enumeration, so this method uses PInvoke to create the socket. It is not possible to create a VSock by instantiating the Socket class directly.

As a result, some members of the Socket class, such as SocketAddressFamily and SocketSocketType, will not reflect accurate information.

Exceptions

SocketException An error occurred creating a socket with type.

See Also