19#include <idfxx/net/endpoint>
20#include <idfxx/net/error>
37class connectionless_channel;
151 const void* _seg =
nullptr;
165 const ::netbuf* _buf =
nullptr;
185#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
235 friend class detail::connectionless_channel;
240 ::netbuf* _buf =
nullptr;
252inline constexpr bool std::ranges::enable_borrowed_range<idfxx::net::netconn::buffer::segment_view> =
true;
Address/port pair identifying a transport endpoint.
Forward iterator over a buffer's data segments.
std::ptrdiff_t difference_type
std::forward_iterator_tag iterator_concept
bool operator==(const iterator &other) const noexcept
Compares two iterators; equal iff they reference the same segment.
std::span< const std::byte > value_type
iterator() noexcept=default
Constructs a past-the-end iterator.
std::input_iterator_tag iterator_category
A forward range over a buffer's data segments.
iterator begin() const noexcept
Returns an iterator to the first segment.
Owning handle for a netconn buffer.
size_t copy_into(std::span< std::byte > dst) const noexcept
Copies all segments into a destination buffer.
buffer() noexcept=default
Default-constructs an empty (non-owning) buffer handle.
segment_view segments() const noexcept
Returns a forward range over the buffer's data segments.
size_t len() const noexcept
Returns the total length of all segments.
result< void > try_attach(std::span< const std::byte > data)
Attaches an external (non-owned) buffer for sending.
static result< buffer > make()
Allocates an empty buffer.
void attach(std::span< const std::byte > data)
Attaches an external (non-owned) buffer for sending.
bool is_open() const noexcept
Returns true if this buffer owns a netbuf (false after move-from).
A raw IP netconn channel.
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.