Files
esphome/esphome/components
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
..
2025-06-11 17:06:45 +12:00
2025-06-11 17:06:45 +12:00
2025-06-11 17:06:45 +12:00
2025-10-22 22:24:17 -04:00
2025-12-08 14:37:45 -05:00
2025-11-04 10:45:32 +13:00
2025-11-01 17:45:42 +11:00
2025-06-11 17:06:45 +12:00
2025-12-08 14:37:45 -05:00