1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +09:00

More debug messages

This commit is contained in:
lidgren
2010-08-29 11:07:20 +00:00
parent bdfdbb3601
commit 1c73e5e279

View File

@@ -67,6 +67,8 @@ namespace Lidgren.Network
pong.Write((byte)pingNumber);
pong.Write(now);
m_owner.LogDebug("Sending pong for remote ping #" + pingNumber);
m_owner.SendLibraryImmediately(pong, m_remoteEndpoint);
}
@@ -138,6 +140,8 @@ namespace Lidgren.Network
m_lastSentPingNumber++;
m_lastPingSendTime = now;
m_owner.LogDebug("Sending ping #" + m_lastSentPingNumber);
// in case of not heard for a while
if (m_lastSendRespondedTo > 0 && (now > m_lastSendRespondedTo + (m_owner.Configuration.m_pingFrequency * 1.5f)))
m_nextPing = now + (m_owner.Configuration.m_pingFrequency * 0.5f); // double ping rate