| 414 | } |
| 415 | |
| 416 | bool HttpStreamTransport::processIncomingData() { |
| 417 | if (!isConnected()) { |
| 418 | return false; |
| 419 | } |
| 420 | |
| 421 | // Read incoming data from socket |
| 422 | u8 buffer[1024]; |
| 423 | int bytesRead = recvData(buffer); |
| 424 | |
| 425 | if (bytesRead < 0) { |
| 426 | // Error reading from socket |
| 427 | mConnection.onDisconnected(); |
| 428 | disconnect(); |
| 429 | return false; |
| 430 | } |
| 431 | |
| 432 | if (bytesRead == 0) { |
| 433 | // No data available (non-blocking socket) |
| 434 | return false; |
| 435 | } |
| 436 | |
| 437 | // Feed data to chunked reader |
| 438 | mReader.feed(fl::span<const u8>(buffer, static_cast<size_t>(bytesRead))); |
| 439 | |
| 440 | return true; |
| 441 | } |
| 442 | |
| 443 | void HttpStreamTransport::handleConnectionStateChange(u32 currentTimeMs) { |
| 444 | if (isConnected()) { |
nothing calls this directly
no test coverage detected