2025-12-11 01:58:28 -06:00
|
|
|
using LANCommander.SDK;
|
2025-11-16 12:31:25 -06:00
|
|
|
using LANCommander.Server.Settings.Enums;
|
|
|
|
|
|
|
|
|
|
namespace LANCommander.Server.Settings.Models;
|
|
|
|
|
|
|
|
|
|
public class GameServerSettings
|
|
|
|
|
{
|
2025-12-11 01:58:28 -06:00
|
|
|
public string StoragePath { get; set; } = AppPaths.GetConfigPath("Servers");
|
2026-06-13 23:51:37 -05:00
|
|
|
|
|
|
|
|
// Seconds to wait after the last player stops a game before stopping its
|
|
|
|
|
// on-player-activity servers. Debounces stop/start thrash when players relaunch.
|
|
|
|
|
public int AutostopDelay { get; set; } = 300;
|
2026-06-14 00:53:19 -05:00
|
|
|
|
|
|
|
|
// Seconds without a keepalive from the launcher before an active play session is considered
|
|
|
|
|
// stale and ended. Should comfortably exceed the launcher's keepalive interval.
|
|
|
|
|
public int KeepAliveTimeout { get; set; } = 120;
|
|
|
|
|
|
|
|
|
|
// Seconds between sweeps that end stale play sessions.
|
|
|
|
|
public int KeepAliveSweepInterval { get; set; } = 30;
|
2025-11-17 18:01:53 -06:00
|
|
|
public IEnumerable<ServerEngineConfiguration> ServerEngines { get; set; } =
|
|
|
|
|
[
|
|
|
|
|
new()
|
2025-11-16 12:31:25 -06:00
|
|
|
{
|
|
|
|
|
Name = "Local",
|
|
|
|
|
Type = ServerEngine.Local,
|
|
|
|
|
},
|
2025-11-17 18:01:53 -06:00
|
|
|
new()
|
2025-11-16 12:31:25 -06:00
|
|
|
{
|
|
|
|
|
Name = "Docker",
|
|
|
|
|
Type = ServerEngine.Docker,
|
|
|
|
|
Address = "unix:///var/run/docker.sock",
|
|
|
|
|
}
|
2025-11-17 18:01:53 -06:00
|
|
|
];
|
2025-11-16 12:31:25 -06:00
|
|
|
}
|