MqttBrokerConnection class

Implemented types


MqttBrokerConnection({@required String server, @required int port, String clientIdentifier, String username, String password})


hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


connect(String lastWillTopic, Uint8List lastWillData, bool lastWillRetained, int lastWillQos) Future<Null>
Connects to the mqtt broker. The connection must respect the last will parameters. The connect method of each instance may only be called once. If it is called a second time on the same instance a StateError must be thrown.
disconnect() Future<Null>
Disconnects from the mqtt broker and cancels all subscriptions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
publish(String topic, Uint8List data, bool retained, int qos) Future<Null>
Publishes data to topic with respect to retained. Awaiting the returned future should guarantee the publishing of the message to the broker with respect to the quality of service qos. A qos of 0 does not guarentee anything and might return immediately. If this is called while disconnecting, a DisconnectingError should be thrown
subscribe(String topic, int qos) Future<Stream<Uint8List>>
Subscribes to topic. Awaiting the returned future gives a Stream whichs events are incoming messages on the topic. If this is called while disconnecting, a DisconnectingError should be thrown.
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]