|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
Raw socket configuration. More...
#include <idfxx_net/include/idfxx/net/raw_socket.hpp>
Public Attributes | |
| ip_protocol | protocol = {} |
IP-layer protocol (e.g. ip_protocol::icmp). Required. | |
| address_family | family = address_family::ipv4 |
| Address family (IPv4 / IPv6). | |
| bool | non_blocking = false |
| If true, I/O calls return immediately when no data or buffer space is available rather than blocking the calling task. | |
| std::optional< std::chrono::milliseconds > | recv_timeout = std::nullopt |
Maximum time recv/recv_from will block waiting for data before returning errc::timed_out. | |
| std::optional< std::chrono::milliseconds > | send_timeout = std::nullopt |
Maximum time send/send_to will block waiting for buffer space before returning errc::timed_out. | |
| std::optional< std::string_view > | bind_to_device = std::nullopt |
| Restrict the socket to a specific network interface, identified by name. | |
Raw socket configuration.
protocol is required (no sensible default exists). Defaults otherwise produce a blocking IPv4 raw socket.
Definition at line 58 of file raw_socket.hpp.
| std::optional<std::string_view> idfxx::net::raw_socket::config::bind_to_device = std::nullopt |
Restrict the socket to a specific network interface, identified by name.
Equivalent to the POSIX SO_BINDTODEVICE option.
Definition at line 77 of file raw_socket.hpp.
| address_family idfxx::net::raw_socket::config::family = address_family::ipv4 |
Address family (IPv4 / IPv6).
Definition at line 60 of file raw_socket.hpp.
If true, I/O calls return immediately when no data or buffer space is available rather than blocking the calling task.
Equivalent to the POSIX O_NONBLOCK flag.
Definition at line 63 of file raw_socket.hpp.
| ip_protocol idfxx::net::raw_socket::config::protocol = {} |
IP-layer protocol (e.g. ip_protocol::icmp). Required.
Definition at line 59 of file raw_socket.hpp.
| std::optional<std::chrono::milliseconds> idfxx::net::raw_socket::config::recv_timeout = std::nullopt |
Maximum time recv/recv_from will block waiting for data before returning errc::timed_out.
Definition at line 66 of file raw_socket.hpp.
| std::optional<std::chrono::milliseconds> idfxx::net::raw_socket::config::send_timeout = std::nullopt |
Maximum time send/send_to will block waiting for buffer space before returning errc::timed_out.
Definition at line 69 of file raw_socket.hpp.