Пример #1
0
        /// <summary>
        /// Tells Agones that the Game Server is ready to take player connections
        /// </summary>
        /// <returns>gRPC Status of the request</returns>
        public async Task <Status> ReadyAsync()
        {
            try
            {
                await client.ReadyAsync(new Empty(), deadline : DateTime.UtcNow.AddSeconds(RequestTimeoutSec), cancellationToken : ctoken);

                return(new Status(StatusCode.OK, "Ready request successful."));
            }
            catch (RpcException ex)
            {
                LogError(ex, "Unable to mark GameServer to 'Ready' state.");
                return(ex.Status);
            }
        }
Пример #2
0
        /// <summary>
        /// Tells Agones that the Game Server is ready to take player connections
        /// </summary>
        /// <returns>gRPC Status of the request</returns>
        public async Task <Status> ReadyAsync()
        {
            try
            {
                await client.ReadyAsync(new Empty(), deadline : DateTime.UtcNow.AddSeconds(RequestTimeout), cancellationToken : ctoken);

                return(new Status(StatusCode.OK, "Ready request successful."));
            }
            catch (RpcException ex)
            {
                Console.Error.WriteLine(ex.Message);
                return(ex.Status);
            }
        }