20#include <idfxx/net/endpoint>
21#include <idfxx/net/error>
63 bool non_blocking =
false;
66 std::optional<std::chrono::milliseconds> recv_timeout = std::nullopt;
69 std::optional<std::chrono::milliseconds> send_timeout = std::nullopt;
70#ifdef CONFIG_LWIP_IPV6
77 std::optional<std::string_view> bind_to_device = std::nullopt;
82#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
102#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
124#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
146#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
172 explicit from_fd_t() =
default;
176 : connectionless_socket_base(
fd,
fam) {}
raw_socket(const config &cfg)
Creates a new raw socket with the given configuration.
static result< raw_socket > make(ip_protocol protocol, address_family fam)
Creates a new raw socket for the given protocol and address family.
result< size_t > try_send(std::span< const std::byte > buf)
Sends a raw packet on a connected socket.
static result< raw_socket > make(const config &cfg)
Creates a new raw socket with the given configuration.
raw_socket(ip_protocol protocol, address_family fam)
Creates a new raw socket for the given protocol and address family.
static result< raw_socket > make(ip_protocol protocol)
Creates a new raw IPv4 socket for the given IP protocol.
raw_socket(ip_protocol protocol)
Creates a new raw IPv4 socket for the given IP protocol.
size_t send(std::span< const std::byte > buf)
Sends a raw packet on a connected socket.
address_family
Address family.
ip_protocol
IP-layer protocol number, per IANA assigned protocol numbers.
T unwrap(result< T > result)
Throws a std::system_error if the result is an error.
std::expected< T, std::error_code > result
result type wrapping a value or error code.
Raw socket configuration.