DtlsTransport.recvFrom

ptrdiff_t recvFrom(ubyte[] buffer, out DatagramEndpoint sender)

Receives a single datagram.

Parameters

bufferBuffer to receive data into.
senderOutput parameter set to the sender's address.

Returns

Bytes received (>0), 0 for an empty (zero-length) UDP datagram

— a legal packet that must be treated as received-but-empty, NOT as EOF or "no data" — or the negative IoResult.WOULD_BLOCK / IoResult.ERROR codes.