| 120 | } |
| 121 | |
| 122 | void NativeHttpClient::update(u32 currentTimeMs) { |
| 123 | // Update connection state machine |
| 124 | mConnection.update(currentTimeMs); |
| 125 | |
| 126 | // Check if we should reconnect |
| 127 | if (mConnection.shouldReconnect()) { |
| 128 | // Attempt reconnection |
| 129 | connect(); |
| 130 | } |
| 131 | |
| 132 | // Check if connection was lost |
| 133 | if (!isConnected() && mSocket.is_open()) { |
| 134 | disconnect(); |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | bool NativeHttpClient::shouldSendHeartbeat(u32 currentTimeMs) const { |
| 139 | return mConnection.shouldSendHeartbeat(currentTimeMs); |
nothing calls this directly
no test coverage detected