Skip to content

Commit ef45231

Browse files
authored
Update SocketHelpers.h to expose ping timeout
1 parent 9f0337f commit ef45231

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: libraries/SocketWrapper/src/SocketHelpers.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ class MbedSocketClass {
118118
*
119119
* return: RTT in milliseconds or -1 on error
120120
*/
121-
int ping(const char* hostname, uint8_t ttl = 255);
122-
int ping(const String &hostname, uint8_t ttl = 255);
123-
int ping(IPAddress host, uint8_t ttl = 255);
121+
int ping(const char* hostname, uint8_t ttl = 255, uint32_t timeout = 5000);
122+
int ping(const String &hostname, uint8_t ttl = 255, uint32_t timeout = 5000);
123+
int ping(IPAddress host, uint8_t ttl = 255, uint32_t timeout = 5000);
124124

125125
/*
126126
* Download a file from an HTTP endpoint and save it in the provided `target` location on the fs
@@ -185,7 +185,7 @@ class MbedSocketClass {
185185

186186
void body_callback(const char* data, uint32_t data_len);
187187

188-
int ping(SocketAddress &socketAddress, uint8_t ttl, uint32_t timeout = 5000);
188+
int ping(SocketAddress &socketAddress, uint8_t ttl, uint32_t timeout);
189189
static arduino::IPAddress ipAddressFromSocketAddress(SocketAddress socketAddress);
190190
static SocketAddress socketAddressFromIpAddress(arduino::IPAddress ip, uint16_t port);
191191
static nsapi_error_t gethostbyname(NetworkInterface* interface, const char* aHostname, SocketAddress* socketAddress);

0 commit comments

Comments
 (0)