fun connect(): Future<Any>
Connect client to MQTT library
This method may only be called once and should be called when the application is ready to receive and send messages to the broker. Client will automatically reconnect if necessary.
IllegalStateException
- If called more than once.
Return
Future that completes after connection to broker is complete.