mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 02:34:29 +05:00
* added MqttWriter * added MqttWiFiClient (modified WiFiClient for esp8266) * adaptation HomeAssistantHelper for MqttWriter * adaptation HaHelper for new HomeAssistantHelper
24 lines
355 B
C++
24 lines
355 B
C++
#include <WiFiClient.h>
|
|
|
|
class MqttWiFiClient : public WiFiClient {
|
|
public:
|
|
#ifdef ARDUINO_ARCH_ESP8266
|
|
void flush() override {
|
|
if (this->connected()) {
|
|
WiFiClient::flush(0);
|
|
}
|
|
}
|
|
|
|
void stop() override {
|
|
this->abort();
|
|
}
|
|
#endif
|
|
|
|
#ifdef ARDUINO_ARCH_ESP32
|
|
void setSync(bool) {}
|
|
|
|
bool getSync() {
|
|
return false;
|
|
}
|
|
#endif
|
|
}; |