|
sMQTTBroker
|
#include <sMQTTBroker.h>
Public Member Functions | |
| bool | init (unsigned short port, bool checkWifiConnection=false) |
| setup broker | |
| void | update () |
| call in loop function | |
| void | publish (const std::string &topic, const std::string &payload, unsigned char qos=0, bool retain=false) |
| publish message | |
| void | restart () |
| restart WIFI server | |
| virtual bool | onEvent (sMQTTEvent *event) |
| receive event from broker | |
| SMQTT_DEPRECATED ("onConnect is deprecated, use onEvent") virtual bool onConnect(sMQTTClient *client | |
| SMQTT_DEPRECATED ("onRemove is deprecated, use onEvent") virtual void onRemove(sMQTTClient *) | |
| SMQTT_DEPRECATED ("onPublish is deprecated, use onEvent") virtual void onPublish(sMQTTClient *client | |
Public Attributes | |
| const std::string & | username |
| const std::string const std::string & | password { return true |
| const std::string & | topic |
| const std::string const std::string & | payload {} |
Main class