|
ESPHome 2026.3.0-dev
|
#include <bsd_sockets_impl.h>
Public Member Functions | |
| BSDSocketImpl (int fd, bool monitor_loop=false) | |
| ~BSDSocketImpl () | |
| BSDSocketImpl (const BSDSocketImpl &)=delete | |
| BSDSocketImpl & | operator= (const BSDSocketImpl &)=delete |
| int | connect (const struct sockaddr *addr, socklen_t addrlen) |
| std::unique_ptr< BSDSocketImpl > | accept (struct sockaddr *addr, socklen_t *addrlen) |
| std::unique_ptr< BSDSocketImpl > | accept_loop_monitored (struct sockaddr *addr, socklen_t *addrlen) |
| int | bind (const struct sockaddr *addr, socklen_t addrlen) |
| int | close () |
| int | shutdown (int how) |
| int | getpeername (struct sockaddr *addr, socklen_t *addrlen) |
| int | getsockname (struct sockaddr *addr, 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 | listen (int backlog) |
| ssize_t | read (void *buf, size_t len) |
| ssize_t | recvfrom (void *buf, size_t len, sockaddr *addr, socklen_t *addr_len) |
| ssize_t | readv (const struct iovec *iov, int iovcnt) |
| ssize_t | write (const void *buf, size_t len) |
| ssize_t | send (const void *buf, size_t len, int flags) |
| ssize_t | writev (const struct iovec *iov, int iovcnt) |
| ssize_t | sendto (const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) |
| int | setblocking (bool blocking) |
| int | loop () |
| bool | ready () const |
| int | get_fd () const |
Protected Attributes | |
| int | fd_ {-1} |
| bool | closed_ {false} |
| bool | loop_monitored_ {false} |
Definition at line 18 of file bsd_sockets_impl.h.
| esphome::socket::BSDSocketImpl::BSDSocketImpl | ( | int | fd, |
| bool | monitor_loop = false ) |
Definition at line 12 of file bsd_sockets_impl.cpp.
| esphome::socket::BSDSocketImpl::~BSDSocketImpl | ( | ) |
Definition at line 21 of file bsd_sockets_impl.cpp.
|
delete |
|
inline |
Definition at line 26 of file bsd_sockets_impl.h.
|
inline |
Definition at line 32 of file bsd_sockets_impl.h.
Definition at line 39 of file bsd_sockets_impl.h.
| int esphome::socket::BSDSocketImpl::close | ( | ) |
Definition at line 27 of file bsd_sockets_impl.cpp.
|
inline |
Definition at line 25 of file bsd_sockets_impl.h.
|
inline |
Definition at line 104 of file bsd_sockets_impl.h.
|
inline |
Definition at line 43 of file bsd_sockets_impl.h.
| size_t esphome::socket::BSDSocketImpl::getpeername_to | ( | std::span< char, SOCKADDR_STR_LEN > | buf | ) |
Format peer address into a fixed-size buffer (no heap allocation)
Definition at line 53 of file bsd_sockets_impl.cpp.
|
inline |
Definition at line 44 of file bsd_sockets_impl.h.
| size_t esphome::socket::BSDSocketImpl::getsockname_to | ( | std::span< char, SOCKADDR_STR_LEN > | buf | ) |
Format local address into a fixed-size buffer (no heap allocation)
Definition at line 63 of file bsd_sockets_impl.cpp.
|
inline |
Definition at line 51 of file bsd_sockets_impl.h.
|
inline |
Definition at line 57 of file bsd_sockets_impl.h.
|
inline |
Definition at line 100 of file bsd_sockets_impl.h.
|
delete |
|
inline |
Definition at line 58 of file bsd_sockets_impl.h.
Definition at line 72 of file bsd_sockets_impl.h.
| bool esphome::socket::BSDSocketImpl::ready | ( | ) | const |
Definition at line 51 of file bsd_sockets_impl.cpp.
|
inline |
Definition at line 65 of file bsd_sockets_impl.h.
|
inline |
Definition at line 86 of file bsd_sockets_impl.h.
|
inline |
Definition at line 95 of file bsd_sockets_impl.h.
| int esphome::socket::BSDSocketImpl::setblocking | ( | bool | blocking | ) |
Definition at line 40 of file bsd_sockets_impl.cpp.
|
inline |
Definition at line 54 of file bsd_sockets_impl.h.
|
inline |
Definition at line 41 of file bsd_sockets_impl.h.
|
inline |
Definition at line 79 of file bsd_sockets_impl.h.
Definition at line 87 of file bsd_sockets_impl.h.
|
protected |
Definition at line 108 of file bsd_sockets_impl.h.
|
protected |
Definition at line 107 of file bsd_sockets_impl.h.
|
protected |
Definition at line 109 of file bsd_sockets_impl.h.