vertx / io.vertx.kotlin.core.net / io.vertx.core.net.NetServer / listenAwait

listenAwait

suspend fun NetServer.listenAwait(): NetServer

Like io.vertx.core.net.NetServer but providing a handler that will be notified when the server is listening, or fails.

Parameters

listenHandler - handler that will be notified when listening or failed

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

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

Like io.vertx.core.net.NetServer but providing a handler that will be notified when the server is listening, or fails.

Parameters

port - the port to listen on

host - the host to listen on

listenHandler - handler that will be notified when listening or failed

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

suspend fun NetServer.listenAwait(port: Int): NetServer

Like io.vertx.core.net.NetServer but providing a handler that will be notified when the server is listening, or fails.

Parameters

port - the port to listen on

listenHandler - handler that will be notified when listening or failed

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

suspend fun NetServer.listenAwait(localAddress: SocketAddress): NetServer

Like io.vertx.core.net.NetServer but providing a handler that will be notified when the server is listening, or fails.

Parameters

localAddress - the local address to listen on

listenHandler - handler that will be notified when listening or failed

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