File tree 2 files changed +21
-6
lines changed
libraries/ESP8266WiFi/src
2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -107,12 +107,12 @@ class WiFiClient : public Client, public SList<WiFiClient> {
107
107
static void stopAll ();
108
108
static void stopAllExcept (WiFiClient * c);
109
109
110
- void keepAlive (uint16_t idle_sec = TCP_DEFAULT_KEEPALIVE_IDLE_SEC, uint16_t intv_sec = TCP_DEFAULT_KEEPALIVE_INTERVAL_SEC, uint8_t count = TCP_DEFAULT_KEEPALIVE_COUNT);
111
- bool isKeepAliveEnabled () const ;
112
- uint16_t getKeepAliveIdle () const ;
113
- uint16_t getKeepAliveInterval () const ;
114
- uint8_t getKeepAliveCount () const ;
115
- void disableKeepAlive () { keepAlive (0 , 0 , 0 ); }
110
+ virtual void keepAlive (uint16_t idle_sec = TCP_DEFAULT_KEEPALIVE_IDLE_SEC, uint16_t intv_sec = TCP_DEFAULT_KEEPALIVE_INTERVAL_SEC, uint8_t count = TCP_DEFAULT_KEEPALIVE_COUNT);
111
+ virtual bool isKeepAliveEnabled () const ;
112
+ virtual uint16_t getKeepAliveIdle () const ;
113
+ virtual uint16_t getKeepAliveInterval () const ;
114
+ virtual uint8_t getKeepAliveCount () const ;
115
+ virtual void disableKeepAlive () { keepAlive (0 , 0 , 0 ); }
116
116
117
117
// default NoDelay=False (Nagle=True=!NoDelay)
118
118
// Nagle is for shortly delaying outgoing data, to send less/bigger packets
Original file line number Diff line number Diff line change @@ -357,6 +357,21 @@ class WiFiClientSecure : public WiFiClient {
357
357
358
358
// consume bytes after use (see peekBuffer)
359
359
virtual void peekConsume (size_t consume) override { return _ctx->peekConsume (consume); }
360
+
361
+ void keepAlive (uint16_t idle_sec = TCP_DEFAULT_KEEPALIVE_IDLE_SEC, uint16_t intv_sec = TCP_DEFAULT_KEEPALIVE_INTERVAL_SEC, uint8_t count = TCP_DEFAULT_KEEPALIVE_COUNT) override
362
+ {
363
+ _ctx->keepAlive (idle_sec, intv_sec, count);
364
+ }
365
+
366
+ bool isKeepAliveEnabled () const override { return _ctx->isKeepAliveEnabled (); };
367
+
368
+ uint16_t getKeepAliveIdle () const override { return _ctx->getKeepAliveIdle (); };
369
+
370
+ uint16_t getKeepAliveInterval () const override { return _ctx->getKeepAliveInterval (); };
371
+
372
+ uint8_t getKeepAliveCount () const override { return _ctx->getKeepAliveCount (); };
373
+
374
+ void disableKeepAlive () override { _ctx->disableKeepAlive (); };
360
375
361
376
private:
362
377
std::shared_ptr<WiFiClientSecureCtx> _ctx;
You can’t perform that action at this time.
0 commit comments