MCPcopy Create free account
hub / github.com/FastLED/FastLED / processIncomingData

Method processIncomingData

src/fl/net/http/stream_transport.cpp.hpp:416–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416bool 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
443void HttpStreamTransport::handleConnectionStateChange(u32 currentTimeMs) {
444 if (isConnected()) {

Callers

nothing calls this directly

Calls 2

onDisconnectedMethod · 0.80
feedMethod · 0.45

Tested by

no test coverage detected