MqttClient

MQTT Client implementation

Constructors

this
this(Settings settings)
Undocumented in source.

Members

Functions

connect
void connect()

Connects to the specified broker and sends it the Connect packet

disconnect
void disconnect()

Sends Disconnect packet to the broker and closes the underlying connection

onConnAck
void onConnAck(ConnAck packet)

Response to connection request

onDisconnect
void onDisconnect()

Client was disconnected from broker

onPingResp
void onPingResp(PingResp packet)

Response to PingReq

onPubAck
void onPubAck(PubAck packet)

Publish request acknowledged - QoS1

onPubComp
void onPubComp(PubComp packet)

Confirmation that message was succesfully delivered (Sender side)

onPubRec
void onPubRec(PubRec packet)

Publish request acknowledged - QoS2

onPubRel
void onPubRel(PubRel packet)
Undocumented in source. Be warned that the author may not have intended to support it.
onPublish
void onPublish(Publish packet)

Message was received from broker

onSubAck
void onSubAck(SubAck packet)

Message was succesfully delivered to broker

onUnsubAck
void onUnsubAck(UnsubAck packet)

Confirmation that unsubscribe request was successfully delivered to broker

publish
void publish(string topic, T payload, QoSLevel qos, bool retain)

Publishes the message on the specified topic

subscribe
void subscribe(string[] topics, QoSLevel qos)

Subscribes to the specified topics

unsubscribe
void unsubscribe(string[] topics)

Unsubscribes from the specified topics

Properties

connected
bool connected [@property getter]

Return true, if client is in a connected state

Meta