User Manual
IPAddress hostByName ( const char* hostname )
Parameters:
hostname: A string representing the domain name to lookup (ex. "www.adafruit.com").
Returns: The IPAddress (https://adafru.it/lGd) corresponding to the specified hostname.
bool hostByName ( const char* hostname, IPAddress& result )
Looks up the domain name specified in the 'hostname' string, and assigns it to the
IPAddress (https://adafru.it/lGd) referenced by the 'result'.
Parameters:
hostname: A string representing the domain name to lookup (ex. "www.adafruit.com").
result: the IPAddress (https://adafru.it/lGd) object that the lookup results will be assigned to.
Returns: 'True' (1) if the DNS lookup was successful, otherwise 'false' (0).
bool hostByName ( const String &hostname, IPAddress& result )
Looks up the domain name specified in the 'hostname' string, and assigns it to the
IPAddress (https://adafru.it/lGd) referenced by the 'result'.
Parameters:
hostname: A string representing the domain name to lookup (ex. "www.adafruit.com").
result: the IPAddress (https://adafru.it/lGd) object that the lookup results will be assigned to.
Returns: 'True' (1) if the DNS lookup was successful, otherwise 'false' (0).
Ping
Ping can be used to detect of another server or device is available (although not all devices respond to ping
requests!). The following helpers are available for this purpose:
uint32_t ping (char const* host)
Pings the domain name specified in the 'host' string.
Parameters:
host: The domain name to ping (ex. "www.adafruit.com").
Returns: The response time in milliseconds if the domain responded to the ping request, or '0' if the ping failed.
uint32_t ping (IPAddress ip)
Pings the specified IPAddress (https://adafru.it/lGd).
Parameters:
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 64 of 202










