adapnex::core::UDPConnection::ReadPacket
Receive a datagram from the peer if available and return immediately (non‐blocking).
Synopsis
Declared in <adapnex/core/network.h>
virtual
ssize_t
ReadPacket(std::span<uint8_t> data) = 0;
Return Value
Returns the number of bytes received (0 if no datagram was available), or ‐1 on error.
Parameters
| Name | Description |
|---|---|
data |
The buffer to receive the datagram into. |
Created with MrDocs