예제 #1
0
        public override void HandleMessage(ClientStructure client, IMessageData message)
        {
            var data = (FlagBaseMsgData)message;

            switch (data.FlagMessageType)
            {
            case FlagMessageType.ListRequest:
                FlagSyncMsgSender.HandleFlagListRequestMessage(client);
                break;

            case FlagMessageType.FlagDelete:
                FlagSyncMsgSender.HandleFlagDeleteMessage(client, (FlagDeleteMsgData)message);
                break;

            case FlagMessageType.FlagData:
                FlagSyncMsgSender.HandleFlagDataMessage(client, (FlagDataMsgData)message);
                break;
            }
        }
예제 #2
0
        public override void HandleMessage(ClientStructure client, IClientMessageBase message)
        {
            var data = (FlagBaseMsgData)message.Data;

            switch (data.FlagMessageType)
            {
            case FlagMessageType.ListRequest:
                FlagSyncMsgSender.HandleFlagListRequestMessage(client);
                //We don't use this message anymore so we can recycle it
                message.Recycle();
                break;

            case FlagMessageType.FlagDelete:
                FlagSyncMsgSender.HandleFlagDeleteMessage(client, (FlagDeleteMsgData)data);
                break;

            case FlagMessageType.FlagData:
                FlagSyncMsgSender.HandleFlagDataMessage(client, (FlagDataMsgData)data);
                break;
            }
        }