Implemented MQTT over TLS for WiFiDevice
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <WiFiClient.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
#include <Preferences.h>
|
||||
#include "NetworkDevice.h"
|
||||
#include "../SpiffsCookie.h"
|
||||
|
||||
class WifiDevice : public NetworkDevice
|
||||
{
|
||||
public:
|
||||
WifiDevice(const String& hostname);
|
||||
WifiDevice(const String& hostname, Preferences* _preferences);
|
||||
|
||||
virtual void initialize();
|
||||
virtual void reconfigure();
|
||||
@@ -20,7 +22,8 @@ public:
|
||||
virtual PubSubClient *mqttClient();
|
||||
|
||||
private:
|
||||
WiFiClient _wifiClient;
|
||||
PubSubClient _mqttClient;
|
||||
WiFiClient* _wifiClient = nullptr;
|
||||
WiFiClientSecure* _wifiClientSecure = nullptr;
|
||||
PubSubClient* _mqttClient = nullptr;
|
||||
SpiffsCookie _cookie;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user