Example #1
0
        //消息接收
        public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel model)
        {
            switch (model.command)
            {
            case LoginProtocol.LOGIN_CREQ:
                login(token, model.GetMessage <AccountInfoDTO>());
                break;

            case LoginProtocol.REG_CREQ:
                reg(token, model.GetMessage <AccountInfoDTO>());
                break;
            }
        }
Example #2
0
        public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message)
        {
            switch (message.command)
            {
            case UserProtocol.CREATE_CREQ:
                create(token, message.GetMessage <string>());
                break;

            case UserProtocol.INFO_CREQ:
                info(token);
                break;

            case UserProtocol.ONLINE_CREQ:
                online(token);
                break;
            }
        }