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

Method handle_sending

src/fl/net/http/fetch_request.cpp.hpp:213–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213void FetchRequest::handle_sending() {
214 ssize_t sent = send(mSocketFd,
215 mRequestBuffer.c_str() + mBytesSent,
216 mRequestBuffer.size() - mBytesSent,
217 0);
218
219 if (sent > 0) {
220 mBytesSent += sent;
221 if (mBytesSent >= mRequestBuffer.size()) {
222 FL_WARN("[FETCH] Waiting for HTTP response...");
223 mState = RECEIVING;
224 mStateStartTime = fl::millis();
225 }
226 } else if (sent < 0) {
227 int err = GET_SOCKET_ERROR();
228 if (err != SOCKET_ERROR_WOULD_BLOCK) {
229 complete_error("Send failed");
230 }
231 // EWOULDBLOCK: Try again on next update()
232 }
233}
234
235void FetchRequest::handle_receiving() {
236 char buffer[4096];

Callers

nothing calls this directly

Calls 4

sendFunction · 0.50
millisFunction · 0.50
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected