namespace SVSim.EmulatedEntrypoint.Services; /// /// Thin wrapper around the static Steamworks.SteamServer API. Exists purely so /// can be unit-tested — Facepunch.Steamworks is a static /// class with process-global state that can't be mocked or run twice in the same test host. /// /// Only the operations actually invokes are exposed. Add /// methods here as needed rather than expanding the surface speculatively. /// public interface ISteamServer { /// Initialize the underlying Steam game server with the given app id. Idempotent. void Initialize(int appId); /// /// Open an auth session for the given steam id with the given ticket bytes. Returns true /// when Steam accepts the ticket. Returns false on any rejection — most commonly the /// "duplicate request" case (the steam id already has an open session on this server), /// which is the failure mode resolves by calling /// first. /// bool BeginAuthSession(byte[] ticket, ulong steamId); /// /// Close any active auth session for this steam id. Safe to call when no session exists /// (Steam SDK no-ops). Must be called before a second for /// the same steam id or Steam will reject the new call as a duplicate request. /// void EndSession(ulong steamId); /// Tear down the game server. Implicitly ends every open auth session. void Shutdown(); }