HvSocketSetContainerPassthru Method

Sets the container pass-through socket option.

Definition

Namespace: Ookii.VmSockets
Assembly: Ookii.VmSockets (in Ookii.VmSockets.dll) Version: 1.0.0+087207370c685ccfa01d10830e6db3af2770247a
C#
public static void SetContainerPassthru(
	Socket socket,
	bool value
)

Parameters

socket  Socket
A Hyper-V socket.
value  Boolean
to enable pass-through; otherwise, .

Remarks

This socket option was introduced in Windows 10, version 1607 (build 14393), and was removed in Windows 11, version 22h2 (build 22621).

The behavior of this function is undefined if the socket is not a Hyper-V socket.

Exceptions

ArgumentNullExceptionsocket is .
ObjectDisposedException The Socket object has been closed.
SocketException An error occurred when attempting to access the socket.

See Also