예제 #1
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        PlayerUnreadCount = new PlayerUnreadCount();
                        PlayerUnreadCount.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
예제 #2
0
        public void send_NewMessage(PlayerUnreadCount playerUnreadCount)
        {
            oprot_.WriteMessageBegin(new TMessage("NewMessage", TMessageType.Call, seqid_));
            NewMessage_args args = new NewMessage_args();

            args.PlayerUnreadCount = playerUnreadCount;
            args.Write(oprot_);
            oprot_.WriteMessageEnd();
            oprot_.Transport.Flush();
        }
예제 #3
0
        public void NewMessage(PlayerUnreadCount playerUnreadCount)
        {
            IPlayer player;

            locker.Lock((uint)playerUnreadCount.Id, out player).Do(() =>
            {
                if (player.Session == null)
                {
                    return;
                }

                try
                {
                    protocolFactory.CreateProtocol(player.Session).MessageSendUnreadCount(playerUnreadCount.UnreadCount);
                }
                catch { }
            });
        }
예제 #4
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.List)
                    {
                        {
                            PlayerUnreadCount = new List <PlayerUnreadCount>();
                            TList _list0 = iprot.ReadListBegin();
                            for (int _i1 = 0; _i1 < _list0.Count; ++_i1)
                            {
                                PlayerUnreadCount _elem2 = new PlayerUnreadCount();
                                _elem2 = new PlayerUnreadCount();
                                _elem2.Read(iprot);
                                PlayerUnreadCount.Add(_elem2);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
예제 #5
0
 public void NewMessage(PlayerUnreadCount playerUnreadCount)
 {
     send_NewMessage(playerUnreadCount);
     recv_NewMessage();
 }