use espMqttClient, qos2 fixed

This commit is contained in:
MichaelDvP
2023-06-03 16:36:53 +02:00
parent d9c2fe0fb9
commit 7865ddc51f
43 changed files with 3749 additions and 230 deletions

View File

@@ -0,0 +1,36 @@
/*
Copyright (c) 2022 Bert Melis. All rights reserved.
API is based on the original work of Marvin Roger:
https://github.com/marvinroger/async-mqtt-client
This work is licensed under the terms of the MIT license.
For a copy, see <https://opensource.org/licenses/MIT> or
the LICENSE file.
*/
#pragma once
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
#include "Transport/ClientAsync.h"
#include "MqttClientSetup.h"
class espMqttClientAsync : public MqttClientSetup<espMqttClientAsync> {
public:
espMqttClientAsync();
bool connect();
protected:
espMqttClientInternals::ClientAsync _clientAsync;
static void _setupClient(espMqttClientAsync* c);
static void _disconnectClient(espMqttClientAsync* c);
static void onConnectCb(void* a, AsyncClient* c);
static void onDataCb(void* a, AsyncClient* c, void* data, size_t len);
static void onDisconnectCb(void* a, AsyncClient* c);
static void onPollCb(void* a, AsyncClient* c);
};
#endif