DeterministicESPAsyncWebServer v6.28.0
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
netadapt.h File Reference

Network adaptation decisions: TCP window sizing by free RAM + DHCP->static fallback (DETWS_ENABLE_NETADAPT). More...

#include "ServerConfig.h"
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Detailed Description

Network adaptation decisions: TCP window sizing by free RAM + DHCP->static fallback (DETWS_ENABLE_NETADAPT).

Two pure decisions a network manager needs on a memory-constrained, sometimes-headless device:

  • detws_netadapt_window() - size the TCP receive window / RX buffer from the free heap, so a device with RAM to spare uses a bigger window for throughput while a low-memory one shrinks to stay alive. Keeps a reserve untouched and clamps to a sane [min, max].
  • detws_netadapt_dhcp_fallback() - decide when to stop waiting on DHCP and configure a static IP, so a node on a network with no DHCP server still comes up. Triggers once the elapsed wait exceeds the timeout or the retry budget is spent.

Pure, zero heap, no stdlib, host-testable; the app applies the results (lwIP window / netif config).

Definition in file netadapt.h.