Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WiFiClientSecure remoteIP(), remotePort(), localIP(), localPort() functions #8693

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libraries/ESP8266WiFi/src/WiFiClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ class WiFiClient : public Client, public SList<WiFiClient> {
virtual uint8_t connected() override;
virtual operator bool() override;

IPAddress remoteIP();
uint16_t remotePort();
IPAddress localIP();
uint16_t localPort();
virtual IPAddress remoteIP();
virtual uint16_t remotePort();
virtual IPAddress localIP();
virtual uint16_t localPort();

static void setLocalPortStart(uint16_t port) { _localPort = port; }

Expand Down
5 changes: 5 additions & 0 deletions libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ class WiFiClientSecure : public WiFiClient {
void flush() override { (void)flush(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
void setSession(Session *session) { _ctx->setSession(session); }

Expand Down