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

Method injectRecvChunk

tests/fl/net/http/stream_transport.cpp:71–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 void injectRecvChunk(const char* jsonStr) {
72 // Format as chunked data
73 size_t len = fl::strlen(jsonStr);
74 char hexSize[32];
75 fl::snprintf(hexSize, sizeof(hexSize), "%zX\r\n", len);
76
77 injectRecvData(reinterpret_cast<const uint8_t*>(hexSize), fl::strlen(hexSize));
78 injectRecvData(reinterpret_cast<const uint8_t*>(jsonStr), len);
79 injectRecvData(reinterpret_cast<const uint8_t*>("\r\n"), 2);
80 }
81
82 fl::vector<uint8_t> getSentData() const {
83 return mSentData;

Callers 1

FL_TEST_FILEFunction · 0.80

Calls 2

strlenFunction · 0.85
snprintfFunction · 0.85

Tested by

no test coverage detected