vertx / io.vertx.reactivex.mqtt / MqttServer / listen

# listen

`open fun listen(): MqttServer`

Start the server listening for incoming connections using the specified options through the constructor

Return
a reference to this, so the API can be used fluently

`open fun listen(port: Int, host: String): MqttServer`

Start the server listening for incoming connections on the port and host specified

### Parameters

`port` - the port to listen on

`host` - the host to listen on

Return
a reference to this, so the API can be used fluently

`open fun listen(port: Int, host: String, listenHandler: Handler<AsyncResult<MqttServer>>): MqttServer`

Start the server listening for incoming connections on the port and host specified It ignores any options specified through the constructor

### Parameters

`port` - the port to listen on

`host` - the host to listen on

`listenHandler` - handler called when the asynchronous listen call ends

Return
a reference to this, so the API can be used fluently

`open fun listen(port: Int): MqttServer`

Start the server listening for incoming connections on the port specified but on "0.0.0.0" as host. It ignores any options specified through the constructor

### Parameters

`port` - the port to listen on

Return
a reference to this, so the API can be used fluently

`open fun listen(port: Int, listenHandler: Handler<AsyncResult<MqttServer>>): MqttServer`

Start the server listening for incoming connections on the port specified but on "0.0.0.0" as host. It ignores any options specified through the constructor

### Parameters

`port` - the port to listen on

`listenHandler` - handler called when the asynchronous listen call ends

Return
a reference to this, so the API can be used fluently

`open fun listen(listenHandler: Handler<AsyncResult<MqttServer>>): MqttServer`

Start the server listening for incoming connections using the specified options through the constructor

### Parameters

`listenHandler` - handler called when the asynchronous listen call ends

Return
a reference to this, so the API can be used fluently