|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
A datagram received together with the sender's endpoint. More...
Public Attributes | |
| std::span< std::byte > | data |
| Filled portion of the caller's receive buffer (aliases it). | |
| endpoint | from |
| Source endpoint of the datagram. | |
| bool | truncated = false |
True if the datagram was larger than the buffer; data holds the leading portion and the remainder was discarded. | |
A datagram received together with the sender's endpoint.
Returned by try_recv_from on connectionless sockets and netconn connections. data is a sub-span of the buffer the caller passed in, sized to the bytes actually copied. If the datagram was larger than the buffer, truncated is set and the excess bytes are discarded (datagrams cannot be read in pieces).
data aliases the caller's receive buffer — it does not own its storage and is valid only as long as that buffer remains alive and unmodified. Definition at line 228 of file endpoint.hpp.
| std::span<std::byte> idfxx::net::datagram::data |
Filled portion of the caller's receive buffer (aliases it).
Definition at line 229 of file endpoint.hpp.
| endpoint idfxx::net::datagram::from |
Source endpoint of the datagram.
Definition at line 230 of file endpoint.hpp.
True if the datagram was larger than the buffer; data holds the leading portion and the remainder was discarded.
Definition at line 233 of file endpoint.hpp.