Skip to content

Commit 38c8ab4

Browse files
committed
removed setTimeout from WifiClient - read/write timeouts in constructor now
1 parent b5d5219 commit 38c8ab4

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

libraries/WiFi/src/WiFiClient.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ void WiFiClient::stop()
204204
clientSocketHandle = NULL;
205205
_rxBuffer = NULL;
206206
_connected = false;
207+
_lastReadTimeout = 0;
208+
_lastWriteTimeout = 0;
207209
}
208210

209211
int WiFiClient::connect(IPAddress ip, uint16_t port)
@@ -310,13 +312,6 @@ int WiFiClient::setSocketOption(int option, char* value, size_t len)
310312
return res;
311313
}
312314

313-
void WiFiClient::setTimeout(uint32_t seconds)
314-
{
315-
_lastReadTimeout = _timeout;
316-
_lastWriteTimeout = _timeout;
317-
_timeout = seconds * 1000;
318-
}
319-
320315
int WiFiClient::setOption(int option, int *value)
321316
{
322317
int res = setsockopt(fd(), IPPROTO_TCP, option, (char *) value, sizeof(int));

libraries/WiFi/src/WiFiClient.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ class WiFiClient : public ESPLwIPClient
9090
int setSocketOption(int option, char* value, size_t len);
9191
int setOption(int option, int *value);
9292
int getOption(int option, int *value);
93-
void setTimeout(uint32_t seconds);
9493
int setNoDelay(bool nodelay);
9594
bool getNoDelay();
9695

0 commit comments

Comments
 (0)