File tree 1 file changed +20
-4
lines changed
1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,29 @@ Temporary wrap to fix https://github.com/me-no-dev/ESPAsyncTCP/issues/109
9
9
10
10
#include < SyncClient.h>
11
11
12
+ // ref Core 2.5.0: cores/esp8266/IPAddress.h
13
+ #ifndef CONST
14
+ #include < lwip/init.h>
15
+
16
+ #if LWIP_VERSION_MAJOR == 1
17
+ #define CONST
18
+ #else
19
+ #define CONST const
20
+ #endif
21
+
22
+ #endif
23
+
12
24
class SyncClientWrap : public SyncClient {
13
25
14
26
public:
27
+ SyncClientWrap () {}
28
+ ~SyncClientWrap () {}
29
+
30
+ // int connect(const char*, uint16_t);
31
+ using SyncClient::connect;
15
32
16
- int connect (const char *host, uint16_t port);
17
- int connect (CONST IPAddress& ip, uint16_t port) { return connect (ip, port); }
18
- bool flush (unsigned int maxWaitMs = 0 ) { flush (); return true ; }
19
- bool stop (unsigned int maxWaitMs = 0 ) { stop (); return true ; }
33
+ int connect (CONST IPAddress& ip, uint16_t port) { IPAddress _ip (ip); return SyncClient::connect (_ip, port); }
34
+ bool flush (unsigned int maxWaitMs = 0 ) { SyncClient::flush (); return true ; }
35
+ bool stop (unsigned int maxWaitMs = 0 ) { SyncClient::stop (); return true ; }
20
36
21
37
};
You can’t perform that action at this time.
0 commit comments