J. Nick Koston c43015a467 [ota,socket] Use SO_RCVTIMEO for OTA data transfer instead of polling
Replace the non-blocking poll + delay(1) pattern in OTA data transfer
with SO_RCVTIMEO blocking reads. The socket now wakes immediately when
data arrives instead of sleeping 1ms between polls.

Adds SO_RCVTIMEO support to the raw TCP socket implementation (ESP8266,
RP2040) using the existing socket_delay()/socket_wake() infrastructure.
The timeout is stored as a uint8_t in centiseconds, fitting in existing
struct padding with zero RAM cost.

Tested OTA improvements across platforms:
- ESP32-S3: ~15% faster (6.96-7.76s -> 5.87-6.60s)
- LibreTiny RTL: 24% faster (18.84s -> 14.33s)
- LibreTiny BK72xx: 56% faster (55.52s -> 24.38s)
- ESP8266: ~1% faster (compressed OTA, already efficient)
2026-03-09 21:28:08 -10:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2025-12-21 09:26:03 -05:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-12-08 14:37:45 -05:00
2026-02-12 23:04:19 +13:00
2025-07-17 22:40:28 +12:00
2025-12-05 08:48:04 -05:00
S
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme Multiple Licenses
598 MiB
Languages
C++ 55.7%
Python 43.7%
C 0.3%
JavaScript 0.2%