Files
DFTE/examples/StreamingAsync
alex 9e998f92a2 Add TemplateEngineAsyncWeb for safe ESPAsyncWebServer chunked responses
Chunk callbacks may see maxLen==0 or need another tick before progress; plain
0 ends the body and breaks browsers. Provide helpers that use
RESPONSE_TRY_AGAIN, bounded template render retries, and disconnect cleanup.
Update the README and async examples to use the shared wrapper.
2026-05-06 00:44:54 +10:00
..

Streaming Async

Small ESPAsyncWebServer demo that exposes a captive portal over a SoftAP and renders a DFTE template directly to the HTTP response stream. It highlights:

  • Per-request TemplateContext ownership to avoid concurrent request clashes
  • PROGMEM template with shared CSS/header/footer snippets
  • Runtime data from RAM getters (uptime, connected station count)
  • Captive portal DNS redirect so clients automatically receive the dashboard

Build

pio run -d examples/StreamingAsync -e example_esp8266
pio run -d examples/StreamingAsync -e example_esp32

Flash the board, connect to the SoftAP announced by the device (DFTE-Portal-8266 or DFTE-Portal-ESP32, password dfte-demo), and your browser should automatically present the streamed dashboard. If it does not, navigate manually to http://192.168.4.1/.