|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
A raw IP netconn channel. More...
Public Member Functions | |
| raw_channel (ip_protocol protocol) | |
| Creates a raw IPv4 netconn for the given IP protocol. | |
| raw_channel (ip_protocol protocol, address_family fam) | |
| Creates a raw netconn for the given IP protocol and address family. | |
Static Public Member Functions | |
| static result< raw_channel > | make (ip_protocol protocol) |
| Creates a raw IPv4 netconn for the given IP protocol. | |
| static result< raw_channel > | make (ip_protocol protocol, address_family fam) |
| Creates a raw netconn for the given IP protocol and address family. | |
A raw IP netconn channel.
The IP-layer protocol (e.g. ip_protocol::icmp) is selected at construction. Use send_to / recv_from for explicit per-message addressing, or call connect() to set a default peer.
Ownership is exclusive: the channel is non-copyable and move-only. A moved-from channel may only be destroyed, move-assigned, or queried via is_open() (→ false) and idf_handle() (→ nullptr); calling any other method on it is undefined behavior. The destructor releases the channel if open.
Definition at line 43 of file raw_channel.hpp.
|
explicit |
Creates a raw IPv4 netconn for the given IP protocol.
| protocol | IP-layer protocol (e.g. ip_protocol::icmp). |
CONFIG_COMPILER_CXX_EXCEPTIONS is enabled. | std::system_error | on failure. |
| idfxx::net::netconn::raw_channel::raw_channel | ( | ip_protocol | protocol, |
| address_family | fam | ||
| ) |
Creates a raw netconn for the given IP protocol and address family.
| protocol | IP-layer protocol. |
| fam | Address family. |
CONFIG_COMPILER_CXX_EXCEPTIONS is enabled. | std::system_error | on failure. |
|
static |
Creates a raw IPv4 netconn for the given IP protocol.
| protocol | IP-layer protocol. |
|
static |
Creates a raw netconn for the given IP protocol and address family.
| protocol | IP-layer protocol. |
| fam | Address family. |