Table of Contents

Class LocalGameHost

Namespace
Valheim.Testing.GameSessions
Assembly
Valheim.Testing.GameSessions.dll

This machine. Scripts run in a local shell process (pwsh on Windows, bash elsewhere), so the same lock, ship, log and fetch scripts run as on a remote host. The only transport failure is a shell that cannot be started.

public sealed class LocalGameHost : ScriptedGameHost, IGameHost
Inheritance
object
LocalGameHost
Implements
Inherited Members

Constructors

LocalGameHost(string, HostShell)

public LocalGameHost(string name, HostShell shell)

Parameters

name string
shell HostShell

Exceptions

ArgumentException

PowerShell on macOS or Linux: those hosts run bash.

Properties

Kind

public override GameHostKind Kind { get; }

Property Value

GameHostKind

Methods

OpenCliTunnelAsync(int, TimeSpan, int, CancellationToken)

The host's loopback is this machine's: nothing is started and the endpoint is the ValheimCLI port itself.

public override Task<CliTunnel> OpenCliTunnelAsync(int hostPort, TimeSpan readyTimeout, int localPort = 0, CancellationToken cancellation = default)

Parameters

hostPort int
readyTimeout TimeSpan
localPort int
cancellation CancellationToken

Returns

Task<CliTunnel>