mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Changed / added virtual functions for returning connection information (#8693)
Fixes the incorrect behavior of WiFiClientSecure.remoteIP(), .remotePort(), .localIP(), .localPort().
This commit is contained in:
parent
d3eddeb501
commit
5f94a60d78
@ -91,10 +91,10 @@ public:
|
|||||||
virtual uint8_t connected() override;
|
virtual uint8_t connected() override;
|
||||||
virtual operator bool() override;
|
virtual operator bool() override;
|
||||||
|
|
||||||
IPAddress remoteIP();
|
virtual IPAddress remoteIP();
|
||||||
uint16_t remotePort();
|
virtual uint16_t remotePort();
|
||||||
IPAddress localIP();
|
virtual IPAddress localIP();
|
||||||
uint16_t localPort();
|
virtual uint16_t localPort();
|
||||||
|
|
||||||
static void setLocalPortStart(uint16_t port) { _localPort = port; }
|
static void setLocalPortStart(uint16_t port) { _localPort = port; }
|
||||||
|
|
||||||
|
@ -278,6 +278,11 @@ class WiFiClientSecure : public WiFiClient {
|
|||||||
void flush() override { (void)flush(0); }
|
void flush() override { (void)flush(0); }
|
||||||
void stop() override { (void)stop(0); }
|
void stop() override { (void)stop(0); }
|
||||||
|
|
||||||
|
IPAddress remoteIP() override { return _ctx->remoteIP(); }
|
||||||
|
uint16_t remotePort() override { return _ctx->remotePort(); }
|
||||||
|
IPAddress localIP() override { return _ctx->localIP(); }
|
||||||
|
uint16_t localPort() override { return _ctx->localPort(); }
|
||||||
|
|
||||||
// Allow sessions to be saved/restored automatically to a memory area
|
// Allow sessions to be saved/restored automatically to a memory area
|
||||||
void setSession(Session *session) { _ctx->setSession(session); }
|
void setSession(Session *session) { _ctx->setSession(session); }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user