mqtt: automatically start or stop as neede & attempt reconnect

This commit is contained in:
Kevin Hester
2021-04-05 07:53:07 +08:00
parent d19af8b83d
commit e84edc676f
5 changed files with 73 additions and 42 deletions
+8
View File
@@ -37,6 +37,14 @@ class MQTT : private concurrency::OSThread
private:
const char *getCryptTopic(const char *channelId);
/** return true if we have a channel that wants uplink/downlink
*/
bool wantsLink() const;
/** Attempt to connect to server if necessary
*/
void reconnect();
};
void mqttInit();