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

WiFiClient copy constructor #8917

Closed
wants to merge 4 commits into from
Closed
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
5 changes: 5 additions & 0 deletions libraries/WiFi/src/WiFiClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ WiFiClient::WiFiClient(int fd):_connected(true),_timeout(WIFI_CLIENT_DEF_CONN_TI
_rxBuffer.reset(new WiFiClientRxBuffer(fd));
}

WiFiClient::WiFiClient(WiFiClient& other)
{
*this = other;
}

WiFiClient::~WiFiClient()
{
stop();
Expand Down
1 change: 1 addition & 0 deletions libraries/WiFi/src/WiFiClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class WiFiClient : public ESPLwIPClient
WiFiClient *next;
WiFiClient();
WiFiClient(int fd);
WiFiClient(WiFiClient& other);
~WiFiClient();
int connect(IPAddress ip, uint16_t port);
int connect(IPAddress ip, uint16_t port, int32_t timeout_ms);
Expand Down