refactor NetworkDevice interface to work with new esp mqtt lib

This commit is contained in:
technyon
2023-01-28 17:17:46 +01:00
parent a6010a7f49
commit 5853b0dc0e
24 changed files with 493 additions and 287 deletions

View File

@@ -18,7 +18,7 @@ namespace espMqttClientInternals {
class ClientSync : public Transport {
public:
ClientSync(WiFiClient* wiFiClient);
ClientSync();
bool connect(IPAddress ip, uint16_t port) override;
bool connect(const char* host, uint16_t port) override;
size_t write(const uint8_t* buf, size_t size) override;
@@ -27,7 +27,7 @@ class ClientSync : public Transport {
void stop() override;
bool connected() override;
bool disconnected() override;
WiFiClient* client;
WiFiClient client;
};
} // namespace espMqttClientInternals