示例#1
0
        protected Packet(int packetID)
        {
            PacketID = packetID;

            if (Core.Profiling)
            {
                PacketSendProfile prof = PacketSendProfile.Acquire(GetType());
                prof.Increment();
            }
        }
示例#2
0
        protected Packet(int packetID, int length)
        {
            PacketID = packetID;
            m_Length = length;

            m_Stream = PacketWriter.CreateInstance(length); // new PacketWriter( length );
            m_Stream.Write((byte)packetID);

            if (Core.Profiling)
            {
                PacketSendProfile prof = PacketSendProfile.Acquire(GetType());
                prof.Increment();
            }
        }