vertx / io.vertx.kotlin.core.datagram / io.vertx.core.datagram.DatagramSocket / listenAwait

listenAwait

suspend fun DatagramSocket.listenAwait(port: Int, host: String): DatagramSocket

Start listening on the given port and host. The handler will be called when the socket is listening.

Parameters

port - the port to listen on

host - the host to listen on

handler - the handler will be called when listening

Returna
reference to this, so the API can be used fluently *