64 if (shouldResetAttempts) {
78 if (
mConfig.maxReconnectAttempts == 0 ||
119 return timeSinceLastHeartbeat >=
mConfig.heartbeatIntervalMs;
158 return timeSinceLastData >=
mConfig.connectionTimeoutMs;
void update(u32 currentTimeMs)
ConnectionState getState() const
u32 calculateBackoffDelay() const
bool shouldReconnect() const
bool isTimedOut(u32 currentTimeMs) const
HttpConnection(const ConnectionConfig &config=ConnectionConfig())
u32 getReconnectAttempts() const
void onEvent(const asio::error_code &ec, u32 currentTimeMs=0)
void resetReconnectAttempts()
void onConnected(u32 currentTimeMs=0)
bool shouldSendHeartbeat(u32 currentTimeMs) const
u32 getReconnectDelayMs() const
void transitionTo(ConnectionState newState, u32 currentTimeMs)
void onHeartbeatReceived()
bool isDisconnected() const
void resetReconnectState()
void delay(u32 ms, bool run_async=true) FL_NOEXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
Base definition for an LED controller.
bool ok() const
Convenience: true if no error.
Asio-compatible error code: numeric code + optional human-readable message.