mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
update espMqttClient
This commit is contained in:
@@ -65,7 +65,7 @@ class MqttClient {
|
||||
uint16_t publish(const char * topic, uint8_t qos, bool retain, espMqttClientTypes::PayloadCallback callback, size_t length);
|
||||
void clearQueue(bool deleteSessionData = false); // Not MQTT compliant and may cause unpredictable results when `deleteSessionData` = true!
|
||||
const char * getClientId() const;
|
||||
uint16_t getQueue() const;
|
||||
size_t queueSize(); // No const because of mutex
|
||||
void loop();
|
||||
|
||||
protected:
|
||||
@@ -131,9 +131,11 @@ class MqttClient {
|
||||
uint32_t timeSent;
|
||||
espMqttClientInternals::Packet packet;
|
||||
template <typename... Args>
|
||||
OutgoingPacket(uint32_t t, espMqttClientTypes::Error& error, Args&&... args) : // NOLINT(runtime/references)
|
||||
timeSent(t),
|
||||
packet(error, std::forward<Args>(args)...) {}
|
||||
OutgoingPacket(uint32_t t, espMqttClientTypes::Error & error, Args &&... args)
|
||||
: // NOLINT(runtime/references)
|
||||
timeSent(t)
|
||||
, packet(error, std::forward<Args>(args)...) {
|
||||
}
|
||||
};
|
||||
espMqttClientInternals::Outbox<OutgoingPacket> _outbox;
|
||||
size_t _bytesSent;
|
||||
|
||||
Reference in New Issue
Block a user