BoundDatagramSocket

interface BoundDatagramSocket : 
    ASocket,
    ABoundSocket,
    AReadable,
    DatagramReadWriteChannel

Represents a bound datagram socket

Inherited Properties

localAddress

abstract val localAddress: SocketAddress

Local socket address. Could throw an exception if no address bound yet.

socketContext

abstract val socketContext: Job

Represents a socket lifetime, completes at socket closure

Inherited Functions

attachForReading

abstract fun attachForReading(
    channel: ByteChannel
): WriterJob

Attach channel for reading so incoming bytes appears in the attached channel. Only one channel could be attached

dispose

open fun dispose(): Unit

Extension Properties

isClosed

val ASocket.isClosed: Boolean

Check if the socket is closed

Extension Functions

awaitClosed

suspend fun ASocket.awaitClosed(): Unit

Await until socket close

openReadChannel

fun AReadable.openReadChannel(): ByteReadChannel

Open a read channel, could be done only once