Skip to content

Commit

Permalink
WiFiClient copy constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
JAndrassy committed Nov 25, 2023
1 parent 76782f2 commit da56123
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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

0 comments on commit da56123

Please sign in to comment.