예제 #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
파일: AgonesSDK.cs 프로젝트: yuryu/agones
        /// <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);
            }
        }