mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add comment
This commit is contained in:
@@ -10,9 +10,10 @@ the LICENSE file.
|
|||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
|
||||||
|
|
||||||
|
// Added for EMS-ESP
|
||||||
#include "../Config.h"
|
#include "../Config.h"
|
||||||
#if defined(EMC_CLIENT_SECURE)
|
#if defined(EMC_CLIENT_SECURE)
|
||||||
#include <WiFiClientSecure.h> // includes IPAddress
|
#include <WiFiClientSecure.h> // includes IPAddress
|
||||||
#else
|
#else
|
||||||
#include <WiFiClient.h>
|
#include <WiFiClient.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -22,22 +23,22 @@ the LICENSE file.
|
|||||||
namespace espMqttClientInternals {
|
namespace espMqttClientInternals {
|
||||||
|
|
||||||
class ClientSecureSync : public Transport {
|
class ClientSecureSync : public Transport {
|
||||||
public:
|
public:
|
||||||
ClientSecureSync();
|
ClientSecureSync();
|
||||||
bool connect(IPAddress ip, uint16_t port) override;
|
bool connect(IPAddress ip, uint16_t port) override;
|
||||||
bool connect(const char* host, uint16_t port) override;
|
bool connect(const char * host, uint16_t port) override;
|
||||||
size_t write(const uint8_t* buf, size_t size) override;
|
size_t write(const uint8_t * buf, size_t size) override;
|
||||||
int read(uint8_t* buf, size_t size) override;
|
int read(uint8_t * buf, size_t size) override;
|
||||||
void stop() override;
|
void stop() override;
|
||||||
bool connected() override;
|
bool connected() override;
|
||||||
bool disconnected() override;
|
bool disconnected() override;
|
||||||
#if defined(EMC_CLIENT_SECURE)
|
#if defined(EMC_CLIENT_SECURE)
|
||||||
WiFiClientSecure client;
|
WiFiClientSecure client;
|
||||||
#else
|
#else
|
||||||
WiFiClient client;
|
WiFiClient client;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace espMqttClientInternals
|
} // namespace espMqttClientInternals
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user