|
ESPHome 2026.5.0-dev
|
Go to the source code of this file.
Functions | |
| void | esphome_wake_ota_component_any_context (void) |
| void | esphome_fast_select_set_ota_listener_sock (struct lwip_sock *sock) |
| Set the listener netconn that the fast-select callback filters OTA wakes against. | |
| struct lwip_sock * | esphome_lwip_get_sock (int fd) |
| Look up a LwIP socket struct from a file descriptor. | |
| void | esphome_lwip_hook_socket (struct lwip_sock *sock) |
| Hook a socket's netconn callback to notify the main loop task on receive events. | |
| bool | esphome_lwip_set_nodelay (struct lwip_sock *sock, bool enable) |
| Set or clear TCP_NODELAY on a socket's tcp_pcb directly. | |
| void esphome_fast_select_set_ota_listener_sock | ( | struct lwip_sock * | sock | ) |
Set the listener netconn that the fast-select callback filters OTA wakes against.
After this is called, the OTA wake hook only fires for RCVPLUS events whose conn matches this listener. Passing NULL disables OTA wakes (no event matches a NULL listener) — correct behavior before install and after teardown.
Definition at line 164 of file lwip_fast_select.c.
| struct lwip_sock * esphome_lwip_get_sock | ( | int | fd | ) |
Look up a LwIP socket struct from a file descriptor.
Returns NULL if fd is invalid or the socket/netconn is not initialized. Use this at registration time to cache the pointer for esphome_lwip_socket_has_data().
Definition at line 214 of file lwip_fast_select.c.
| void esphome_lwip_hook_socket | ( | struct lwip_sock * | sock | ) |
Hook a socket's netconn callback to notify the main loop task on receive events.
Wraps the original event_callback with one that also calls xTaskNotifyGive(). Must be called from the main loop after socket creation. The sock pointer must have been obtained from esphome_lwip_get_sock().
Definition at line 218 of file lwip_fast_select.c.
| bool esphome_lwip_set_nodelay | ( | struct lwip_sock * | sock, |
| bool | enable ) |
Set or clear TCP_NODELAY on a socket's tcp_pcb directly.
Must be called with the TCPIP core lock held (LwIPLock in C++). This bypasses lwip_setsockopt() overhead (socket lookups, switch cascade, hooks, refcounting) — just a direct pcb->flags bit set/clear. Returns true if successful, false if sock/conn/pcb is NULL or the socket is not TCP.
Definition at line 230 of file lwip_fast_select.c.
|
extern |