protected Packet(int packetID) { PacketID = packetID; if (Core.Profiling) { PacketSendProfile prof = PacketSendProfile.Acquire(GetType()); prof.Increment(); } }
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(); } }