interface AsyncUdpSocket
source · line 9public
public interface AsyncUdpSocket : AsyncCloseable
- Supertype
AsyncCloseable - Inherited
suspend fun close(): Unit· AsyncCloseable
An owned datagram socket preserving message boundaries; each receive describes one datagram.
function receiveFrom
source · line 26public
public suspend fun receiveFrom(buffer: NativeByteBuffer, count: Long): Datagram
Receives one datagram into at most count writable bytes and reports its source and truncation status.
parameter buffer
source · line 26public
buffer: NativeByteBuffer
parameter count
source · line 26public
count: Long
property localAddress
source · line 13public
public val localAddress: SocketAddress
get: public read-only
The actual bound UDP endpoint.
function sendTo
source · line 17public
public suspend fun sendTo(buffer: NativeByteBuffer, destination: SocketAddress, count: Long): Long
Sends one datagram from count readable buffer bytes to the destination.
parameter count
source · line 20public
count: Long
parameter buffer
source · line 18public
buffer: NativeByteBuffer
parameter destination
source · line 19public
destination: SocketAddress