public LogoutReq() : base(PacketType.ClientMsg)
        {
            STT data = new STT();

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

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

            data.Add("type", "keeplive");
            data.Add("tick", currentUnixTick.ToString());
            base.setData(data);
        }
        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);
        }
 public ServerPacket(DouyuPacket srcPacket) : base(srcPacket)
 {
     data = base.Data;
 }
 public ServerPacket(byte[] buffer) : base(buffer)
 {
     //initialize with DouyuPacket(byte[]) constructor
     data = base.Data;
 }
 protected DouyuPacket(PacketType type, STT data)
 {
     pack         = new Packet();
     pack.msgType = (short)type;
     pack.data    = data;
 }