Class HostServer
- Namespace
- Valheim.Testing.GameSessions
- Assembly
- Valheim.Testing.GameSessions.dll
Starts an owned dedicated server on a Linux/bash, macOS/bash or Windows/pwsh host and returns it identified by
process ID and start time, the identity an owned session checks against its adapter's reported process ID. Linux uses
a setsid recorder, macOS a detached supervisor, and both keep stdout and stderr in the boot directory. Windows
uses a short-lived headless task to start the server independently of SSH, then removes that task.
public static class HostServer
- Inheritance
-
objectHostServer
Methods
StartAsync(IGameHost, GameLaunch, string, TimeSpan, IReadOnlyList<string>?, string?, CancellationToken)
public static Task<HostServerProcess> StartAsync(IGameHost host, GameLaunch launch, string bootDirectory, TimeSpan timeout, IReadOnlyList<string>? logs = null, string? evidence = null, CancellationToken cancellation = default)
Parameters
hostIGameHostlaunchGameLaunchbootDirectorystringtimeoutTimeSpanlogsIReadOnlyList<string>evidencestringcancellationCancellationToken
Returns
- Task<HostServerProcess>