idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
raw_channel.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Chris Leishman
3
4#pragma once
5
17#include "sdkconfig.h"
18
19#include <idfxx/net/endpoint>
20#include <idfxx/net/error>
21#include <idfxx/net/netconn/buffer>
23
24#include <cstddef>
25#include <span>
26
27namespace idfxx::net::netconn {
28
43class [[nodiscard]] raw_channel : public detail::connectionless_channel {
44public:
45 // ----- construction -----
46
47#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
56 explicit raw_channel(ip_protocol protocol);
57#endif
58
66
67#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
78#endif
79
88
89private:
90 raw_channel(::netconn* conn, address_family fam) noexcept
91 : connectionless_channel(conn, fam) {}
92};
93
94} // namespace idfxx::net::netconn
95
// end of idfxx_net_netconn_raw_channel
A raw IP netconn channel.
raw_channel(ip_protocol protocol, address_family fam)
Creates a raw netconn for the given IP protocol and address family.
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.
raw_channel(ip_protocol protocol)
Creates a raw IPv4 netconn for the given IP protocol.
address_family
Address family.
Definition endpoint.hpp:37
ip_protocol
IP-layer protocol number, per IANA assigned protocol numbers.
Definition endpoint.hpp:50
std::expected< T, std::error_code > result
result type wrapping a value or error code.
Definition error.hpp:120