J. Nick Koston 7a6df910e5 [api,ota,captive_portal] Use raw pointer for listen sockets to reduce flash
Replace std::unique_ptr<Socket> with raw Socket* for listen sockets
that are created once in setup() and live for the program lifetime.

The unique_ptr move-assign generates dead code to destroy the previous
value (which is always nullptr in setup), including a virtual destructor
call through the vtable that the compiler cannot eliminate because
__uniq_ptr_impl::reset is not inlined.

Changes:
- Use .release() to extract raw pointer from socket factory return
- Add socket_failed_/server_failed_ helpers that combine error logging,
  cleanup, and mark_failed into a single call
- Convert error messages to LOG_STR for flash storage on ESP8266
- Socket destructor already calls close(), so explicit close() before
  delete is unnecessary

Saves 20 bytes on ESP32-IDF, 180 bytes on ESP8266.
2026-02-20 17:57:23 -06: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
2026-02-11 22:11:48 -05:00
2025-12-05 08:48:04 -05:00
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 528 MiB
Languages
C++ 64.1%
Python 35.5%
C 0.3%