|
AlteriomPainlessMesh v2.1.1
Easy ESP32/ESP8266 mesh networking with Alteriom IoT extensions
|
#include <tcp.hpp>
Public Attributes | |
| uint8_t | maxRetries = TCP_CONNECT_MAX_RETRIES |
| Max TCP connect retry attempts before falling back to a WiFi reconnect. | |
| uint32_t | retryDelayMs = TCP_CONNECT_RETRY_DELAY_MS |
| Base delay between retry attempts (ms), scaled by exponential backoff. | |
| uint32_t | stabilizationDelayMs = TCP_CONNECT_STABILIZATION_DELAY_MS |
| Delay after IP acquisition before the TCP connect is attempted (ms) | |
| uint32_t | exhaustionReconnectDelayMs = TCP_EXHAUSTION_RECONNECT_DELAY_MS |
| Delay before the WiFi reconnect that follows retry exhaustion (ms) | |
| uint32_t | failureBlockDurationMs = TCP_FAILURE_BLOCK_DURATION_MS |
| Duration a node is blocklisted after retry exhaustion (ms, 0 = never) | |
User-tunable TCP connection retry parameters
One instance is stored per mesh (painlessmesh::Mesh), configured through Mesh::setTcpRetryConfig(). The member defaults are spelled as the legacy constants above rather than as literals, so the "defaults match the previous hardcoded behaviour exactly" guarantee is enforced by the compiler and cannot silently drift.
NOTE: this deliberately lives on the mesh instance rather than at namespace scope. A mutable namespace-scope instance in this header would give every translation unit its own private copy, so a sketch that configured the mesh in one TU and connected from another would silently fall back to defaults with no diagnostic.
| uint32_t painlessmesh::tcp::TcpRetryConfig::exhaustionReconnectDelayMs = TCP_EXHAUSTION_RECONNECT_DELAY_MS |
Delay before the WiFi reconnect that follows retry exhaustion (ms)
| uint32_t painlessmesh::tcp::TcpRetryConfig::failureBlockDurationMs = TCP_FAILURE_BLOCK_DURATION_MS |
Duration a node is blocklisted after retry exhaustion (ms, 0 = never)
| uint8_t painlessmesh::tcp::TcpRetryConfig::maxRetries = TCP_CONNECT_MAX_RETRIES |
Max TCP connect retry attempts before falling back to a WiFi reconnect.
| uint32_t painlessmesh::tcp::TcpRetryConfig::retryDelayMs = TCP_CONNECT_RETRY_DELAY_MS |
Base delay between retry attempts (ms), scaled by exponential backoff.
| uint32_t painlessmesh::tcp::TcpRetryConfig::stabilizationDelayMs = TCP_CONNECT_STABILIZATION_DELAY_MS |
Delay after IP acquisition before the TCP connect is attempted (ms)