vertx / io.vertx.kotlin.ext.stomp / io.vertx.ext.stomp.StompClient / connectAwait

# connectAwait

`suspend fun StompClient.connectAwait(port: Int, host: String): StompClientConnection`

Connects to the server.

### Parameters

`port` - the server port

`host` - the server host

`resultHandler` - handler called with the connection result

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

`suspend fun StompClient.connectAwait(net: NetClient): StompClientConnection`

Connects to the server.

### Parameters

`net` - the NET client to use

`resultHandler` - handler called with the connection result

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

`suspend fun StompClient.connectAwait(port: Int, host: String, net: NetClient): StompClientConnection`

Connects to the server.

### Parameters

`port` - the server port

`host` - the server host

`net` - the NET client to use

`resultHandler` - handler called with the connection result

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

`suspend fun StompClient.connectAwait(): StompClientConnection`

Connects to the server using the host and port configured in the client's options.

### Parameters

`resultHandler` - handler called with the connection result. A failure will be sent to the handler if a TCP level issue happen before the `CONNECTED` frame is received. Afterwards, the io.vertx.ext.stomp.StompClient is called.

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