You've already forked Adafruit_MQTT_Library
mirror of
https://github.com/adafruit/Adafruit_MQTT_Library.git
synced 2025-07-29 02:02:00 +03:00
ping flushes input, tries multiple times
This commit is contained in:
@ -178,7 +178,7 @@ class Adafruit_MQTT {
|
||||
Adafruit_MQTT_Subscribe *readSubscription(int16_t timeout=0);
|
||||
|
||||
// Ping the server to ensure the connection is still alive.
|
||||
bool ping(uint8_t n);
|
||||
bool ping(uint8_t n = 1);
|
||||
|
||||
protected:
|
||||
// Interface that subclasses need to implement:
|
||||
@ -215,6 +215,8 @@ class Adafruit_MQTT {
|
||||
private:
|
||||
Adafruit_MQTT_Subscribe *subscriptions[MAXSUBSCRIPTIONS];
|
||||
|
||||
void flushIncoming(uint16_t timeout);
|
||||
|
||||
// Functions to generate MQTT packets.
|
||||
uint8_t connectPacket(uint8_t *packet);
|
||||
uint8_t disconnectPacket(uint8_t *packet);
|
||||
|
Reference in New Issue
Block a user