Skip to content

Commit

Permalink
ping: add missing method
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Nov 27, 2024
1 parent 030bdf8 commit fec1109
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libraries/WiFiS3/src/WiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,13 @@ int CWifi::ping(IPAddress ip, uint8_t ttl, uint8_t count) {
return ping(ip.toString().c_str(), ttl, count);
}

/* -------------------------------------------------------------------------- */
int CWifi::ping(const String &hostname, uint8_t ttl, uint8_t count)
/* -------------------------------------------------------------------------- */
{
return ping(hostname.c_str(), ttl);
}

/* -------------------------------------------------------------------------- */
int CWifi::ping(const char* host, uint8_t ttl, uint8_t count) {
/* -------------------------------------------------------------------------- */
Expand Down
1 change: 1 addition & 0 deletions libraries/WiFiS3/src/WiFi.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class CWifi {
* PING
*/
int ping(IPAddress ip, uint8_t ttl = 128, uint8_t count = 1);
int ping(const String &hostname, uint8_t ttl = 128, uint8_t count = 1);
int ping(const char* host, uint8_t ttl = 128, uint8_t count = 1);

/*
Expand Down

0 comments on commit fec1109

Please sign in to comment.