Skip to content

Commit 9b26bd6

Browse files
authored
Update SocketHelpers.cpp to expose ping timeout
1 parent ef45231 commit 9b26bd6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,22 @@ arduino::IPAddress arduino::MbedSocketClass::dnsIP(int n) {
7575
return ipAddressFromSocketAddress(ip);
7676
}
7777

78-
int arduino::MbedSocketClass::ping(const char *hostname, uint8_t ttl)
78+
int arduino::MbedSocketClass::ping(const char *hostname, uint8_t ttl, uint32_t timeout)
7979
{
8080
SocketAddress socketAddress;
8181
gethostbyname(getNetwork(),hostname, &socketAddress);
82-
return ping(socketAddress, ttl);
82+
return ping(socketAddress, ttl, timeout);
8383
}
8484

85-
int arduino::MbedSocketClass::ping(const String &hostname, uint8_t ttl)
85+
int arduino::MbedSocketClass::ping(const String &hostname, uint8_t ttl, uint32_t timeout)
8686
{
87-
return ping(hostname.c_str(), ttl);
87+
return ping(hostname.c_str(), ttl, timeout);
8888
}
8989

90-
int arduino::MbedSocketClass::ping(IPAddress host, uint8_t ttl)
90+
int arduino::MbedSocketClass::ping(IPAddress host, uint8_t ttl, uint32_t timeout)
9191
{
9292
SocketAddress socketAddress = socketAddressFromIpAddress(host, 0);
93-
return ping(socketAddress, ttl);
93+
return ping(socketAddress, ttl, timeout);
9494
}
9595

9696
void arduino::MbedSocketClass::config(arduino::IPAddress local_ip) {

0 commit comments

Comments
 (0)