1
0
mirror of https://github.com/adafruit/Adafruit_MQTT_Library.git synced 2025-07-29 02:02:00 +03:00

support anon auth & generated client id in constructor

This commit is contained in:
Todd Treece
2015-10-05 14:54:37 -04:00
parent aa6db4d5f5
commit b48265faed
2 changed files with 23 additions and 9 deletions

View File

@ -99,10 +99,16 @@ class Adafruit_MQTT_Subscribe; // forward decl
class Adafruit_MQTT {
public:
Adafruit_MQTT(const char *server, uint16_t port, const char *cid,
const char *user, const char *pass);
Adafruit_MQTT(const __FlashStringHelper *server, uint16_t port, const __FlashStringHelper *cid,
const __FlashStringHelper *user, const __FlashStringHelper *pass);
Adafruit_MQTT(const char *server = "io.adafruit.com",
uint16_t port = 1883,
const char *user = "",
const char *pass = "",
const char *cid = "");
Adafruit_MQTT(const __FlashStringHelper *server = 0,
uint16_t port = 1883,
const __FlashStringHelper *user = 0,
const __FlashStringHelper *pass = 0,
const __FlashStringHelper *cid = 0);
virtual ~Adafruit_MQTT() {}
// Connect to the MQTT server. Returns 0 on success, otherwise an error code