[core] Move host socket-select wake mechanism into wake.h/wake.cpp (#15931)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2026-04-23 15:53:10 +12:00
1 parent a881121110
commit 6f00ea1457
7 files changed
+263 -269

No files matched your search

+5 -2
View File
@@ -5,13 +5,16 @@
#include <string>
#include "esphome/core/log.h"
#include "esphome/core/application.h"
#ifdef USE_HOST
#include "esphome/core/wake.h"
#endif
namespace esphome::socket {
#ifdef USE_HOST
// Shared ready() implementation for fd-based socket implementations (BSD and LWIP sockets).
// Checks if the Application's select() loop has marked this fd as ready.
bool socket_ready_fd(int fd, bool loop_monitored) { return !loop_monitored || App.is_socket_ready_(fd); }
// Checks if the host wake select() loop has marked this fd as ready.
bool socket_ready_fd(int fd, bool loop_monitored) { return !loop_monitored || wake_fd_ready(fd); }
#endif
// Platform-specific inet_ntop wrappers