FastLED 3.10.8
Loading...
Searching...
No Matches

◆ update()

void fl::HttpConnection::update ( u32 currentTimeMs)

Definition at line 123 of file connection.cpp.hpp.

123 {
124 // Check for timeout first (before updating timestamps)
125 if (isTimedOut(currentTimeMs)) {
127 return;
128 }
129
130 // Handle reconnection
132 if (currentTimeMs >= mNextReconnectTimeMs) {
133 // Time to attempt reconnection
134 connect(); // Transition to CONNECTING
135 }
136 }
137
138 // Update heartbeat sent timestamp if needed
139 if (shouldSendHeartbeat(currentTimeMs)) {
140 mLastHeartbeatSentMs = currentTimeMs;
141 }
142}
bool isTimedOut(u32 currentTimeMs) const FL_NO_EXCEPT
void connect() FL_NO_EXCEPT
void onDisconnected() FL_NO_EXCEPT
bool shouldSendHeartbeat(u32 currentTimeMs) const FL_NO_EXCEPT
ConnectionState mState
Definition connection.h:76

References connect(), fl::FL_NO_EXCEPT, isTimedOut(), mLastHeartbeatSentMs, mNextReconnectTimeMs, mState, onDisconnected(), fl::RECONNECTING, and shouldSendHeartbeat().

+ Here is the call graph for this function: