| 103 | } |
| 104 | |
| 105 | void NetworkClient::processReceivedPackets() |
| 106 | { |
| 107 | if (_serverConnection != nullptr) |
| 108 | { |
| 109 | while (auto packet = _serverConnection->takeNextPacket()) |
| 110 | { |
| 111 | onReceivePacketFromServer(*packet); |
| 112 | |
| 113 | // A packet handler may close the connection |
| 114 | if (_serverConnection == nullptr) |
| 115 | { |
| 116 | return; |
| 117 | } |
| 118 | } |
| 119 | _serverConnection->update(); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | bool NetworkClient::hasTimedOut() const |
| 124 | { |
nothing calls this directly
no test coverage detected