protected void OnTableListingRequest(TableListingRequest listingRequest, RouteInfo routeInfo)
        {
            TableListingResponse listingResponse = new TableListingResponse();
            listingResponse.ResponseId = listingRequest.RequestId;
            listingResponse.TableSummaries = Manager.Tables.GetTableSummaries();

            ClientBoundSeverEnvelopeObject envelope = new ClientBoundSeverEnvelopeObject();
            envelope.InnerData = Manager.Serializer.GetBytes(listingResponse);
            envelope.InnerOperationCode = (int)GameMessageType.Client_ReceiveTableListingResponse;
            envelope.SenderServerId = Manager.ServerInfo.ServerId;
            envelope.PlayerNames = listingRequest.PlayerName.ToList();

            OutgoingMessage outgoingMessage = ServerMessageFormatter.CreateOutgoingMessage(
                     (int)ServerMessageType.ReceiveForwardMessageToClientRequest,
                     Manager.Serializer.GetBytes(envelope),
                     Manager.ResolveServers(routeInfo.GatewayServerId.ToList()));

            Manager.InternalOutgoingMessageQueue.Add(outgoingMessage);
        }
Пример #2
0
        protected void SendTableListingRequest()
        {
            TableListingRequest request = new TableListingRequest();
            request.PlayerName = Host.UserAccount.PlayerName;
            request.RequestId = Guid.NewGuid().ToString();

            ListingRequestId = request.RequestId;

            Host.SendMessage(GameMessageType.Server_ReceiveTableListingRequest, request);
        }