Class ServerSettings
- Namespace
- Unity.Multiplayer.Core
The server package's own settings, beside the session's NetConfig: the health endpoint, the admin
console, where logs and saves go and how long a clean shutdown may take. Filled from server.json and the
command line by ServerStartup.
public sealed class ServerSettings
- Inheritance
-
ServerSettings
- Inherited Members
Fields
DefaultHealthPort
The health endpoint's default TCP port.
public const ushort DefaultHealthPort = 8081
Field Value
DefaultKeepLogFiles
The default number of log files kept in LogsDirectory.
public const int DefaultKeepLogFiles = 10
Field Value
DefaultLogsDirectory
The default logs folder, relative to the package folder.
public const string DefaultLogsDirectory = "Logs"
Field Value
DefaultSavesDirectory
The default saves folder, relative to the package folder.
public const string DefaultSavesDirectory = "Saves"
Field Value
DefaultShutdownGraceSeconds
The default seconds a clean shutdown may take before the process quits anyway.
public const double DefaultShutdownGraceSeconds = 10
Field Value
HealthPath
The health endpoint's path.
public const string HealthPath = "/healthz"
Field Value
MaxShutdownGraceSeconds
The longest accepted ShutdownGraceSeconds.
public const double MaxShutdownGraceSeconds = 300
Field Value
Properties
AdminCommands
Read admin commands from standard input (AdminConsole). Off by default.
public bool AdminCommands { get; set; }
Property Value
HealthPort
TCP port of the HTTP health endpoint (GET /healthz, see HealthEndpoint); 0 turns it off.
public ushort HealthPort { get; set; }
Property Value
KeepLogFiles
Log files kept in LogsDirectory; older ones are deleted at start. 0 keeps every file.
public int KeepLogFiles { get; set; }
Property Value
LogsDirectory
Where the server writes its log files; relative paths are under the package folder.
public string LogsDirectory { get; set; }
Property Value
SavesDirectory
Where the game keeps persistent data; relative paths are under the package folder.
public string SavesDirectory { get; set; }
Property Value
ShutdownGraceSeconds
Seconds a clean shutdown (SIGTERM, SIGINT, stop) may take before the process quits anyway.
public double ShutdownGraceSeconds { get; set; }
Property Value
Methods
Clone()
Returns a field-by-field copy.
public ServerSettings Clone()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Validate()
Lists every problem; an empty list means the settings are valid.
public IReadOnlyList<string> Validate()