Browse Source

Remove some eap stupid

Adam Johnson 13 years ago
parent
commit
bd6300d6c7
  1. 16
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp
  2. 16
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp
  3. 18
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp

16
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

@ -1698,9 +1698,9 @@ void CliAuConn::AutoPing () {
void CliAuConn::StopAutoPing () {
critsect.Enter();
{
if (AsyncTimer * timer = pingTimer) {
if (pingTimer) {
AsyncTimerDeleteCallback(pingTimer, CliAuConnTimerDestroyed);
pingTimer = nil;
AsyncTimerDeleteCallback(timer, CliAuConnTimerDestroyed);
}
}
critsect.Leave();
@ -1708,17 +1708,6 @@ void CliAuConn::StopAutoPing () {
//============================================================================
void CliAuConn::TimerPing () {
#if 0
// if the time difference between when we last sent a ping and when we last
// heard from the server is >= 3x the ping interval, the socket is stale.
if (pingSendTimeMs && abs(int(pingSendTimeMs - lastHeardTimeMs)) >= kPingTimeoutMs) {
// ping timed out, disconnect the socket
AsyncSocketDisconnect(sock, true);
}
else
#endif
{
// Send a ping request
pingSendTimeMs = GetNonZeroTimeMs();
@ -1732,7 +1721,6 @@ void CliAuConn::TimerPing () {
Send(msg, arrsize(msg));
}
}
//============================================================================
void CliAuConn::Send (const uintptr_t fields[], unsigned count) {

16
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp

@ -445,9 +445,9 @@ void CliGmConn::AutoPing () {
void CliGmConn::StopAutoPing () {
critsect.Enter();
{
if (AsyncTimer * timer = pingTimer) {
if (pingTimer) {
AsyncTimerDeleteCallback(pingTimer, CliGmConnTimerDestroyed);
pingTimer = nil;
AsyncTimerDeleteCallback(timer, CliGmConnTimerDestroyed);
}
}
critsect.Leave();
@ -455,17 +455,6 @@ void CliGmConn::StopAutoPing () {
//============================================================================
void CliGmConn::TimerPing () {
#if 0
// if the time difference between when we last sent a ping and when we last
// heard from the server is >= 3x the ping interval, the socket is stale.
if (pingSendTimeMs && abs(int(pingSendTimeMs - lastHeardTimeMs)) >= kPingTimeoutMs) {
// ping timed out, disconnect the socket
AsyncSocketDisconnect(sock, true);
}
else
#endif
{
// Send a ping request
pingSendTimeMs = GetNonZeroTimeMs();
@ -476,7 +465,6 @@ void CliGmConn::TimerPing () {
Send(msg, arrsize(msg));
}
}
//============================================================================
void CliGmConn::Send (const uintptr_t fields[], unsigned count) {

18
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp

@ -636,9 +636,9 @@ void CliGkConn::AutoPing () {
void CliGkConn::StopAutoPing () {
critsect.Enter();
{
if (AsyncTimer * timer = pingTimer) {
if (pingTimer) {
AsyncTimerDeleteCallback(pingTimer, CliGkConnTimerDestroyed);
pingTimer = nil;
AsyncTimerDeleteCallback(timer, CliGkConnTimerDestroyed);
}
}
critsect.Leave();
@ -646,17 +646,6 @@ void CliGkConn::StopAutoPing () {
//============================================================================
void CliGkConn::TimerPing () {
#if 0
// if the time difference between when we last sent a ping and when we last
// heard from the server is >= 3x the ping interval, the socket is stale.
if (pingSendTimeMs && abs(int(pingSendTimeMs - lastHeardTimeMs)) >= kPingTimeoutMs) {
// ping timed out, disconnect the socket
AsyncSocketDisconnect(sock, true);
}
else
#endif
{
// Send a ping request
pingSendTimeMs = GetNonZeroTimeMs();
@ -668,8 +657,7 @@ void CliGkConn::TimerPing () {
nil
};
//Send(msg, arrsize(msg));
}
Send(msg, arrsize(msg));
}
//============================================================================

Loading…
Cancel
Save