Skip to content

Commit 69e563e

Browse files
committed
MbedClient add possibility to set socket timeout in constructor
1 parent 03be367 commit 69e563e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/SocketWrapper/src/MbedClient.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ class MbedClient : public arduino::Client {
4949
public:
5050
MbedClient();
5151

52+
MbedClient(unsigned long timeout) {
53+
_timeout = timeout;
54+
}
55+
5256
// Copy constructor, to be used when a Client returned by server.available()
5357
// needs to "survive" event if it goes out of scope
5458
// Sample usage: Client* new_client = new Client(existing_client)

0 commit comments

Comments
 (0)