IServerAccess
An interface in Alta.Api.Client, Alta.Api.Client.HighLevel.
Server-side handle for reporting one game server's session to the Alta API: start, stop, ping and online players. ServerAccess calls the API; LocalServerAccess does nothing.
- Listed in Alta.Api.Client
- Derived types
LocalServerAccess,ServerAccess
Properties
| Member | What it is |
|---|---|
bool IsActive { get; set; } | Whether calls go to the API. StopAsync sets it false. |
GameServerInfo ServerInfo { get; } | The API's info for this game server. |
int? ServerSession { get; } | The session id the API returned from StartAsync, or null when no session is running. |
Methods
| Member | What it is |
|---|---|
Task<GameServerInfo> GetTemplateServer() | Gets the template server info for a world-owned server (cached after the first call). Null otherwise. |
Task Ping() | Pings the current server session so the API knows the server is alive. |
Task SetOnlinePlayersAsync(IEnumerable<UserInfo> onlinePlayers) | Updates the server's online player list locally and, when active with a session, on the API. |
Task StartAsync(ServerStartArguments startupArgs) | Starts a server session on the API (or registers a local server) and stores the session id. |
Task StopAsync(ShutdownReason reason) | Ends the server session on the API with the given reason and marks the access inactive. |
Used in
Members of other types that take, return or hold a IServerAccess:
IServerApiClient.CreateNewServerAsync, IServerApiClient.GetControllableServerAsync, IServerApiClient.GetControllableServersAsync, OfflineServerApiClient.CreateNewServerAsync, OfflineServerApiClient.GetControllableServerAsync, OfflineServerApiClient.GetControllableServersAsync, ServerApiClient.CreateNewServerAsync, ServerApiClient.GetControllableServerAsync, ServerApiClient.GetControllableServersAsync, ServersManager.SelectedServerChanged, ServersManager.servers, ServerHandler.ServerApiAccess, ServerHandler.ServerHandler, ServerLifetimePipeline.AttemptToStartServer, ServerLifetimePipeline.StartServerHandler, ServerSaveUtility.ServerSaveUtility, GameModeManager.StartLocalTest, GameModeManager.StartServer, LocalTestGameMode.LocalTestGameMode, LocalTestGameMode.serverAccess, MenuSettings.LocalGameServerAccess, ServerHostingGameMode.server, ServerHostingGameMode.ServerHostingGameMode.