Definition at line 64 of file RpcClient.ino.
64 {
67
68 }
69
70 Serial.println(
"\n=== HTTP RPC Client Example ===\n");
71 Serial.println(
"This example connects to an HTTP RPC server");
72 Serial.println(
"and calls remote methods using all three RPC modes:");
73 Serial.println(
" - SYNC: Immediate response");
74 Serial.println(
" - ASYNC: ACK + later result");
75 Serial.println(
" - ASYNC_STREAM: ACK + updates + final");
78
79
84
85
87
88
91
92
94 Serial.println(
"[CALLBACK] Connected to server!");
95
98 });
99
101 Serial.println(
"[CALLBACK] Disconnected from server!");
102
106 });
107
108
110 []() {
return transport->readRequest(); },
112 );
113
114
116 Serial.println(
"ERROR: Failed to connect to server!");
117 Serial.println(
"Make sure RpcServer example is running.");
120 return;
121 }
122
123 Serial.println(
"Connected successfully!");
125}
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
fl::unique_ptr< fl::Remote > remote
fl::unique_ptr< fl::net::http::HttpStreamClient > transport
void fill_solid(CRGB *targetArray, int numToFill, const CRGB &color) FL_NOEXCEPT
Fill a range of LEDs with a solid color.
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
void printf(const char *format, const Args &... args) FL_NOEXCEPT
Printf-like formatting function that prints directly to the platform output.
fl::enable_if<!fl::is_array< T >::value, unique_ptr< T > >::type make_unique(Args &&... args) FL_NOEXCEPT
@ Green
<div style='background:#008000;width:4em;height:4em;'></div>
@ Red
<div style='background:#FF0000;width:4em;height:4em;'></div>
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
References fl::CRGB::Black, DATA_PIN, FastLED, fill_solid(), GRB, fl::CRGB::Green, leds, fl::make_unique(), NUM_LEDS, fl::printf(), fl::CRGB::Red, remote, Serial, SERVER_HOST, SERVER_PORT, transport, and waitingForResponse.