suspend fun send(src: ByteBuffer, target: SocketAddress): Int
(source)
Sends a datagram via this channel.
src
- The buffer containing the datagram to be sent.
target
- The address to which the datagram is to be sent.
ClosedChannelException
- If the channel is closed.
AsynchronousCloseException
- If another thread closes this channel while the send operation is in progress.
ClosedByInterruptException
- If another thread interrupts the current thread while the send 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 number of bytes sent.