Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
mqtt client for Qt
C++ C Prolog
branch: master

network: clear buffer after a message is received

This ensures that shorter payloads does not end with data from previous
(and longer) messages.

README.md

QMQTT

mqtt client for Qt

Usage

#include "qmqtt.h"

QMQTT::Client *client = new QMQTT::Client("localhost", 18883);

client->setClientId("clientId");

client->setUsername("user");

client->setPassword("password");

client->connect();

Slots

void connect();

quint16 publish(Message &message);

void puback(quint8 type, quint16 msgid);

quint16 subscribe(const QString &topic, quint8 qos);

void unsubscribe(const QString &topic);

void ping();

void disconnect();

Signals

void connected();

void error(QAbstractSocket::SocketError);

void connacked(quint8 ack);

void published(Message &message);

void pubacked(quint8 type, quint16 msgid);

void received(const Message &message);

void subscribed(const QString &topic);

void subacked(quint16 mid, quint8 qos);

void unsubscribed(const QString &topic);

void unsubacked(quint16 mid);

void pong();

void disconnected();
Something went wrong with that request. Please try again.