Class DirectServerProcess
public sealed class DirectServerProcess : IOwnedProcess
- Inheritance
-
objectDirectServerProcess
- Implements
Constructors
DirectServerProcess(ProcessStartInfo, string, params string[])
public DirectServerProcess(ProcessStartInfo start, string logPrefix, params string[] gameLogs)
Parameters
startProcessStartInfologPrefixstringgameLogsstring[]
Properties
HasExited
public bool HasExited { get; }
Property Value
- bool
Id
public int Id { get; }
Property Value
- int
Quit
How StopCleanly(TimeSpan, TimeSpan) asks the process to quit: Interrupt for a dedicated server (the default), CloseWindow for a game client.
public QuitRequest Quit { get; init; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Stop(TimeSpan)
Kills the process at once and waits up to timeout for it to exit.
public void Stop(TimeSpan timeout)
Parameters
timeoutTimeSpan
StopCleanly(TimeSpan, TimeSpan)
Asks the process to quit as Quit says and waits up to quit; kills it only if it is
still running then (or could not be asked). Keeps the logs either way.
public ProcessStop StopCleanly(TimeSpan quit, TimeSpan kill)
Parameters
quitTimeSpankillTimeSpan
Returns
WaitForExitAsync(CancellationToken)
Completes with the exit code when the process exits; startup fails as soon as it does.
public Task<int> WaitForExitAsync(CancellationToken cancellation)
Parameters
cancellationCancellationToken
Returns
- Task<int>