Giter Site home page Giter Site logo

skywzb / qmqtt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emqx/qmqtt

1.0 0.0 0.0 1.43 MB

MQTT Client for Qt

Home Page: http://emqtt.io/

License: BSD 3-Clause "New" or "Revised" License

Prolog 0.01% QML 0.14% QMake 0.07% C 0.43% C++ 85.75% CMake 0.71% Makefile 0.63% M4 0.62% Python 10.94% Shell 0.64% Objective-C 0.08%

qmqtt's Introduction

QMQTT

mqtt client for Qt

Please compile the library with Qt >= 5.3 version. On Windows you need to specify CONFIG += NO_UNIT_TESTS, since gtest is not supported.

Usage

#include "qmqtt.h"

QMQTT::Client *client = new QMQTT::Client(QHostAddress::LocalHost, 1883);
client->setClientId("clientId");
client->setUsername("user");
client->setPassword("password");
client->connectToHost();

Slots

void setHost(const QHostAddress& host);
void setPort(const quint16 port);
void setClientId(const QString& clientId);
void setUsername(const QString& username);
void setPassword(const QString& password);
void setKeepAlive(const int keepAlive);
void setCleanSession(const bool cleansess);
void setAutoReconnect(const bool value);
void setAutoReconnectInterval(const int autoReconnectInterval);
void setWillTopic(const QString& willTopic);
void setWillQos(const quint8 willQos);
void setWillRetain(const bool willRetain);
void setWillMessage(const QString& willMessage);

void connectToHost();
void disconnectFromHost();

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

quint16 publish(const Message& message);

Signals

void connected();
void disconnected();
void error(const QMQTT::ClientError error);

void subscribed(const QString& topic, const quint8 qos);
void unsubscribed(const QString& topic);
void published(const quint16 msgid, const quint8 qos);
void pingresp();
void received(const QMQTT::Message& message);

License

New BSD License

Contributors

@Kampfgnom

@rafaeldelucena

@Vortex375

@mwallnoefer

@KonstantinRitt

@cncap

@Psy-Kai

@ejvr

@keytee

Authors

@emqplus Feng Lee [email protected]

@wguynes William Guynes [email protected]

@wuming123057 Xuan [email protected]

qmqtt's People

Contributors

wguynes avatar wuming123057 avatar mwallnoefer avatar ejvr avatar konstantinritt avatar avsdev-cw avatar rafaeldelucena avatar cncap avatar hxcan avatar keytee avatar maggu2810 avatar kollix avatar ehntoo avatar kampfgnom avatar sbradford26 avatar

Stargazers

Wang ZheBin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.