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