Example #1
0
        /// <summary>
        /// Sends the given bytes representing a full packet, to the Client
        /// </summary>
        /// <param name="packet"></param>
        public override void Send(byte[] packet, int offset, int count)
        {
            if (IsOffline)
            {
                return;
            }

            PerformanceCounters.PacketsSentPerSecond.Increment();
            PerformanceCounters.TotalBytesSent.IncrementBy(count);

#if DEBUG
            DebugUtil.DumpPacketOut(Account, packet, offset, count, PacketSender.Server);
#endif

            if (IsEncrypted)
            {
                Encrypt(packet, offset);
            }

            base.Send(packet, offset, count);
        }