/// <summary> /// This returns most of the backing GameServer configuration and Status. /// This can be useful for instances where you may want to know Health check configuration, or the IP and Port the GameServer is currently allocated to. /// </summary> /// <returns>A GameServer object containing this GameServer's configuration data</returns> public async Task <GameServer> GetGameServerAsync() { try { return(await client.GetGameServerAsync(new Empty(), deadline : DateTime.UtcNow.AddSeconds(RequestTimeout), cancellationToken : ctoken)); } catch (RpcException ex) { Console.Error.WriteLine(ex.Message); //Should I rethrow the exception? return(null); } }
/// <summary> /// This returns most of the backing GameServer configuration and Status. /// This can be useful for instances where you may want to know Health check configuration, or the IP and Port the GameServer is currently allocated to. /// </summary> /// <returns>A GameServer object containing this GameServer's configuration data</returns> public async Task <GameServer> GetGameServerAsync() { try { return(await client.GetGameServerAsync(new Empty(), deadline : DateTime.UtcNow.AddSeconds(RequestTimeoutSec), cancellationToken : ctoken)); } catch (RpcException ex) { LogError(ex, "Unable to get GameServer configuration and status."); throw; } }