From 9a0f6390137496dc6499cc555f139480bce4c95d Mon Sep 17 00:00:00 2001 From: Andrey Fedorov <2af@mail.ru> Date: Tue, 23 Apr 2019 11:18:30 +0300 Subject: [PATCH] Update HttpClient.h In ESP32/ESP8266 in Client there are two additional abstract methods exists: virtual int connect(IPAddress ip, uint16_t port, int timeout) =0; virtual int connect(const char *host, uint16_t port, int timeout) =0; They are not implemented in HttpClient.h, so compilations stops with error. --- src/HttpClient.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/HttpClient.h b/src/HttpClient.h index 38fd799..9123f42 100644 --- a/src/HttpClient.h +++ b/src/HttpClient.h @@ -312,6 +312,19 @@ class HttpClient : public Client // Inherited from Client virtual int connect(IPAddress ip, uint16_t port) { return iClient->connect(ip, port); }; virtual int connect(const char *host, uint16_t port) { return iClient->connect(host, port); }; + + #ifdef ESP32 || ESP8266 + virtual int connect(IPAddress ip, uint16_t port, int timeout) + { + throw "Method [virtual int connect(IPAddress ip, uint16_t port, int timeout)] is not implemented in HttpClient.h"; + } + + virtual int connect(const char *host, uint16_t port, int timeout) + { + throw "Method [virtual int connect(const char *host, uint16_t port, int timeout)] is not implemented in HttpClient.h"; + } + #endif + virtual void stop(); virtual uint8_t connected() { return iClient->connected(); }; virtual operator bool() { return bool(iClient); };