You've already forked Adafruit_MQTT_Library
mirror of
https://github.com/adafruit/Adafruit_MQTT_Library.git
synced 2025-07-21 18:22:06 +03:00
settable keepalive interval
This commit is contained in:
@ -184,6 +184,9 @@ public:
|
||||
bool will(const char *topic, const char *payload, uint8_t qos = 0,
|
||||
uint8_t retain = 0);
|
||||
|
||||
// Sets the KeepAlive Interval, in seconds.
|
||||
bool setKeepAliveInterval(uint16_t keepAlive);
|
||||
|
||||
// Publish a message to a topic using the specified QoS level. Returns true
|
||||
// if the message was published, false otherwise.
|
||||
bool publish(const char *topic, const char *payload, uint8_t qos = 0);
|
||||
@ -250,6 +253,7 @@ protected:
|
||||
const char *will_payload;
|
||||
uint8_t will_qos;
|
||||
uint8_t will_retain;
|
||||
uint16_t keepAliveInterval; // MQTT KeepAlive time interval, in seconds
|
||||
uint8_t buffer[MAXBUFFERSIZE]; // one buffer, used for all incoming/outgoing
|
||||
uint16_t packet_id_counter;
|
||||
|
||||
|
Reference in New Issue
Block a user