| 279 | } |
| 280 | |
| 281 | HttpStreamServer::ClientState* HttpStreamServer::getOrCreateClientState(u32 clientId) { |
| 282 | // Check if state already exists |
| 283 | auto it = mClientStates.find(clientId); |
| 284 | if (it != mClientStates.end()) { |
| 285 | return &it->second; |
| 286 | } |
| 287 | |
| 288 | // Create new state |
| 289 | mClientStates.insert(fl::make_pair(clientId, ClientState(clientId))); |
| 290 | |
| 291 | // Find and return the newly created state |
| 292 | it = mClientStates.find(clientId); |
| 293 | if (it != mClientStates.end()) { |
| 294 | return &it->second; |
| 295 | } |
| 296 | |
| 297 | return nullptr; |
| 298 | } |
| 299 | |
| 300 | void HttpStreamServer::removeClientState(u32 clientId) { |
| 301 | auto it = mClientStates.find(clientId); |
nothing calls this directly
no test coverage detected