|
FastLED 3.10.8
|
| fl::Remote::Remote | ( | RequestSource | source, |
| ResponseSink | sink ) |
Construct with I/O callbacks.
| source | Function that returns next JSON-RPC request (or nullopt if none) |
| sink | Function that handles outgoing JSON-RPC responses |
Example (Serial): fl::Remote remote( [&]() { return parseJsonRpcFromSerial(); }, [](const fl::json& r) { writeJsonRpcToSerial(r); } );
Example (HTTP Streaming): auto transport = fl::make_shared<HttpStreamClient>("localhost", 8080); fl::Remote remote( [&transport]() { return transport->readRequest(); }, [&transport](const fl::json& r) { transport->writeResponse(r); } ); // In main loop: transport->update(millis()); remote.update(millis());
Definition at line 311 of file remote.cpp.hpp.
References Remote(), fl::FL_NO_EXCEPT, and fl::adl_barrier::move().
Referenced by Remote(), Remote(), Remote(), fl::WLED::WLED(), operator=(), and operator=().
Here is the call graph for this function:
Here is the caller graph for this function: