public override void HandleMessage(ClientStructure client, IMessageData messageData)
        {
            var message = messageData as WarpBaseMsgData;

            switch (message?.WarpMessageType)
            {
            case WarpMessageType.NEW_SUBSPACE:
                WarpReceiver.HandleNewSubspace(client, (WarpNewSubspaceMsgData)messageData);
                break;

            case WarpMessageType.CHANGE_SUBSPACE:
                WarpReceiver.HandleChangeSubspace(client, (WarpChangeSubspaceMsgData)messageData);
                break;

            case WarpMessageType.SUBSPACES_REQUEST:
                WarpSystemSender.SendAllSubspaces(client);
                break;

            default:
                throw new NotImplementedException("Warp Type not implemented");
            }
        }
예제 #2
0
        public override void HandleMessage(ClientStructure client, IClientMessageBase message)
        {
            var messageData = message.Data as WarpBaseMsgData;

            switch (messageData?.WarpMessageType)
            {
            case WarpMessageType.NewSubspace:
                WarpReceiver.HandleNewSubspace(client, (WarpNewSubspaceMsgData)messageData);
                break;

            case WarpMessageType.ChangeSubspace:
                WarpReceiver.HandleChangeSubspace(client, (WarpChangeSubspaceMsgData)messageData);
                break;

            case WarpMessageType.SubspacesRequest:
                WarpSystemSender.SendAllSubspaces(client);
                //We don't use this message anymore so we can recycle it
                message.Recycle();
                break;

            default:
                throw new NotImplementedException("Warp Type not implemented");
            }
        }