Ejemplo n.º 1
0
        protected Packet(int packetID)
        {
            PacketID = packetID;

            if (Core.Profiling)
            {
                PacketSendProfile prof = PacketSendProfile.Acquire(GetType());
                prof.Increment();
            }
        }
Ejemplo n.º 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();
            }
        }