|
ESPHome 2026.3.0-dev
|
Non-virtual common base for LWIP raw TCP sockets. More...
#include <lwip_raw_tcp_impl.h>
Public Member Functions | |
| LWIPRawCommon (sa_family_t family, struct tcp_pcb *pcb) | |
| ~LWIPRawCommon () | |
| LWIPRawCommon (const LWIPRawCommon &)=delete | |
| LWIPRawCommon & | operator= (const LWIPRawCommon &)=delete |
| int | bind (const struct sockaddr *name, socklen_t addrlen) |
| int | close () |
| int | shutdown (int how) |
| int | getpeername (struct sockaddr *name, socklen_t *addrlen) |
| int | getsockname (struct sockaddr *name, socklen_t *addrlen) |
| size_t | getpeername_to (std::span< char, SOCKADDR_STR_LEN > buf) |
| Format peer address into a fixed-size buffer (no heap allocation) | |
| size_t | getsockname_to (std::span< char, SOCKADDR_STR_LEN > buf) |
| Format local address into a fixed-size buffer (no heap allocation) | |
| int | getsockopt (int level, int optname, void *optval, socklen_t *optlen) |
| int | setsockopt (int level, int optname, const void *optval, socklen_t optlen) |
| int | get_fd () const |
Protected Member Functions | |
| int | ip2sockaddr_ (ip_addr_t *ip, uint16_t port, struct sockaddr *name, socklen_t *addrlen) |
Protected Attributes | |
| struct tcp_pcb * | pcb_ |
| bool | nodelay_ = false |
| sa_family_t | family_ = 0 |
Non-virtual common base for LWIP raw TCP sockets.
Provides shared fields and methods for both connected and listening sockets. No virtual methods — pure code sharing.
Definition at line 27 of file lwip_raw_tcp_impl.h.
|
inline |
Definition at line 29 of file lwip_raw_tcp_impl.h.
| esphome::socket::LWIPRawCommon::~LWIPRawCommon | ( | ) |
Definition at line 56 of file lwip_raw_tcp_impl.cpp.
|
delete |
Definition at line 64 of file lwip_raw_tcp_impl.cpp.
| int esphome::socket::LWIPRawCommon::close | ( | ) |
Definition at line 129 of file lwip_raw_tcp_impl.cpp.
|
inline |
Definition at line 49 of file lwip_raw_tcp_impl.h.
Definition at line 173 of file lwip_raw_tcp_impl.cpp.
| size_t esphome::socket::LWIPRawCommon::getpeername_to | ( | std::span< char, SOCKADDR_STR_LEN > | buf | ) |
Format peer address into a fixed-size buffer (no heap allocation)
Definition at line 197 of file lwip_raw_tcp_impl.cpp.
Definition at line 185 of file lwip_raw_tcp_impl.cpp.
| size_t esphome::socket::LWIPRawCommon::getsockname_to | ( | std::span< char, SOCKADDR_STR_LEN > | buf | ) |
Format local address into a fixed-size buffer (no heap allocation)
Definition at line 207 of file lwip_raw_tcp_impl.cpp.
| int esphome::socket::LWIPRawCommon::getsockopt | ( | int | level, |
| int | optname, | ||
| void * | optval, | ||
| socklen_t * | optlen ) |
Definition at line 217 of file lwip_raw_tcp_impl.cpp.
|
protected |
Definition at line 279 of file lwip_raw_tcp_impl.cpp.
|
delete |
| int esphome::socket::LWIPRawCommon::setsockopt | ( | int | level, |
| int | optname, | ||
| const void * | optval, | ||
| socklen_t | optlen ) |
Definition at line 251 of file lwip_raw_tcp_impl.cpp.
| int esphome::socket::LWIPRawCommon::shutdown | ( | int | how | ) |
Definition at line 147 of file lwip_raw_tcp_impl.cpp.
|
protected |
Definition at line 59 of file lwip_raw_tcp_impl.h.
|
protected |
Definition at line 58 of file lwip_raw_tcp_impl.h.
|
protected |
Definition at line 55 of file lwip_raw_tcp_impl.h.