Esempio n. 1
0
        /// <summary>
        /// 复制一个数据包,使用同一个字节流.
        /// </summary>
        /// <returns></returns>
        public GamePacket Clone()
        {
            GamePacket packet = new GamePacket();

            packet.CopyFrom(Buffer, 0, 0, Length);

            packet.ReadHeader();

            return(packet);
        }
Esempio n. 2
0
        /// <summary>
        /// 复制一个数据包,使用同一个字节流.
        /// </summary>
        /// <returns></returns>
        public GamePacket Clone()
        {
            GamePacket packet = new GamePacket();

            packet.CopyFrom(Buffer, 0, 0, Length);

            packet.ReadHeader();

            return packet;
        }