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

Method sendUpdate

src/fl/remote/rpc/response_send.h:88–103  ·  view source on GitHub ↗

* @brief Send intermediate streaming update (for ASYNC_STREAM mode) * @param update The update payload (any JSON value) * * Creates a JSON-RPC response with "update" marker: * {"jsonrpc": "2.0", "result": {"update": }, "id": } */

Source from the content-addressed store, hash-verified

86 * {"jsonrpc": "2.0", "result": {"update": <update>}, "id": <requestId>}
87 */
88 void sendUpdate(const fl::json& update) {
89 if (!mResponseSink || mIsFinal) {
90 return;
91 }
92
93 fl::json response = fl::json::object();
94 response.set("jsonrpc", "2.0");
95
96 fl::json result = fl::json::object();
97 result.set("update", update);
98
99 response.set("result", result);
100 response.set("id", mRequestId);
101
102 mResponseSink(response);
103 }
104
105 /**
106 * @brief Send final response and mark stream as complete (for ASYNC_STREAM mode)

Callers 3

FL_TEST_FILEFunction · 0.80
response_send.hppFile · 0.80
FL_TEST_FILEFunction · 0.80

Calls 1

setMethod · 0.45

Tested by

no test coverage detected