net-coroutines / org.apache.tuweni.net.coroutines / CoroutineDatagramChannel / receive

receive

suspend fun receive(dst: ByteBuffer): SocketAddress (source)

Receives a datagram via this channel.

Parameters

dst - The buffer into which the datagram is to be transferred.

Exceptions

ClosedChannelException - If the channel is closed.

AsynchronousCloseException - If another thread closes this channel while the receive operation is in progress.

ClosedByInterruptException - If another thread interrupts the current thread while the receive operation is in progress, thereby closing the channel and setting the current thread's interrupt status.

IOException - If some other I/O error occurs.

Return
The datagram's source address.