FastLED 3.9.15
Loading...
Searching...
No Matches

◆ update()

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

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

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

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

+ Here is the call graph for this function: