Example #1
0
        public LogoutReq() : base(PacketType.ClientMsg)
        {
            STT data = new STT();

            data.Add("type", "logout");
            base.setData(data);
        }
Example #2
0
        public LoginReq(int roomId) : base(PacketType.ClientMsg)
        {
            STT data = new STT();

            data.Add("type", "loginreq");
            base.setData(data);
        }
Example #3
0
        public Heratbeat(long currentUnixTick) : base(PacketType.ClientMsg)
        {
            STT data = new STT();

            data.Add("type", "keeplive");
            data.Add("tick", currentUnixTick.ToString());
            base.setData(data);
        }
Example #4
0
        public GroupReq(int roomId) : base(PacketType.ClientMsg)
        {
            STT data = new STT();

            data.Add("type", "joingroup");
            data.Add("rid", roomId.ToString());
            data.Add("gid", "-9999");
            base.setData(data);
        }
Example #5
0
 public ServerPacket(DouyuPacket srcPacket) : base(srcPacket)
 {
     data = base.Data;
 }
Example #6
0
 public ServerPacket(byte[] buffer) : base(buffer)
 {
     //initialize with DouyuPacket(byte[]) constructor
     data = base.Data;
 }
Example #7
0
 protected DouyuPacket(PacketType type, STT data)
 {
     pack         = new Packet();
     pack.msgType = (short)type;
     pack.data    = data;
 }