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 Windows a short-lived headless task independent of SSH.
Each keeps the server's stdout and stderr in the boot directory.
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>