vertx / io.vertx.kotlin.ext.stomp / io.vertx.ext.stomp.StompServer / listenAwait

# listenAwait

`suspend fun StompServer.listenAwait(): StompServer`

Connects the STOMP server default port (61613) and network interface (0.0.0.0). Once the socket it bounds calls the given handler with the result. The result may be a failure if the socket is already used.

### Parameters

`handler` - the handler to call with the result

Returnthe
current io.vertx.ext.stomp.StompServer *

`suspend fun StompServer.listenAwait(port: Int): StompServer`

Connects the STOMP server to the given port. This method use the default host (0.0.0.0). Once the socket it bounds calls the given handler with the result. The result may be a failure if the socket is already used.

### Parameters

`port` - the port

`handler` - the handler to call with the result

Returnthe
current io.vertx.ext.stomp.StompServer *

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

Connects the STOMP server to the given port / interface. Once the socket it bounds calls the given handler with the result. The result may be a failure if the socket is already used.

### Parameters

`port` - the port

`host` - the host / interface

`handler` - the handler to call with the result

Returnthe
current io.vertx.ext.stomp.StompServer *