| 474 | } |
| 475 | |
| 476 | bool NetConnection::checkTimeout(U32 time) |
| 477 | { |
| 478 | if(!isNetworkConnection()) |
| 479 | return false; |
| 480 | |
| 481 | if(time > mLastPingSendTime + PingTimeout) |
| 482 | { |
| 483 | if(mPingSendCount >= mPingRetryCount) |
| 484 | return true; |
| 485 | mLastPingSendTime = time; |
| 486 | mPingSendCount++; |
| 487 | sendPingPacket(); |
| 488 | } |
| 489 | return false; |
| 490 | } |
| 491 | |
| 492 | void NetConnection::keepAlive() |
| 493 | { |