From 885f3058305531327aa239701b846c7eb2d9f160 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Fri, 10 Jan 2020 18:06:40 -0500 Subject: [PATCH] give the R4 2 minute default timeout. Signed-off-by: Sara Damiano --- src/TinyGsmClientSaraR4.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/TinyGsmClientSaraR4.h b/src/TinyGsmClientSaraR4.h index 3e2e6dd..4440617 100644 --- a/src/TinyGsmClientSaraR4.h +++ b/src/TinyGsmClientSaraR4.h @@ -88,8 +88,24 @@ public: return sock_connected; } - -TINY_GSM_CLIENT_CONNECT_OVERLOADS() + virtual int connect(IPAddress ip, uint16_t port, int timeout_s) { + String host; + host.reserve(16); + host += ip[0]; + host += "."; + host += ip[1]; + host += "."; + host += ip[2]; + host += "."; + host += ip[3]; + return connect(host.c_str(), port, timeout_s); + } + virtual int connect(const char* host, uint16_t port) { + return connect(host, port, 120); + } + virtual int connect(IPAddress ip, uint16_t port) { + return connect(ip, port, 120); + } virtual void stop(uint32_t maxWaitMs) { TINY_GSM_CLIENT_DUMP_MODEM_BUFFER()