15#include <idfxx/net/endpoint>
16#include <idfxx/net/error>
21namespace idfxx::net::detail {
23class connectionless_socket_base :
public ip_io_socket_base {
29#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
48 [[nodiscard]] std::span<std::byte> recv(std::span<std::byte> buf) {
return idfxx::unwrap(try_recv(buf)); }
65 [[nodiscard]] result<std::span<std::byte>> try_recv(std::span<std::byte> buf);
67#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
84#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
97 size_t send_to(std::span<const std::byte> buf,
const endpoint& to) {
return idfxx::unwrap(try_send_to(buf, to)); }
108 [[nodiscard]] result<size_t> try_send_to(std::span<const std::byte> buf,
const endpoint& to);
110#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
121 [[nodiscard]] datagram recv_from(std::span<std::byte> buf) {
return idfxx::unwrap(try_recv_from(buf)); }
130 [[nodiscard]] result<datagram> try_recv_from(std::span<std::byte> buf);
133 using ip_io_socket_base::ip_io_socket_base;
result< void > try_disconnect()
Disconnects from the current access point.
void disconnect()
Disconnects from the current access point.
T unwrap(result< T > result)
Throws a std::system_error if the result is an error.
A datagram received together with the sender's endpoint.