Library to resolve text URLs to IP addresses (IPv4)

Dependents:   NetworkSocketAPI NetworkSocketAPI Nucleo-AWS-IoT-mbed

Revision:
3:5705fdae6185
Parent:
2:12d08f0f20cf
Child:
4:3749346dcd59
--- a/DnsQuery.cpp	Wed Aug 05 21:58:57 2015 +0000
+++ b/DnsQuery.cpp	Thu Aug 27 14:33:07 2015 +0000
@@ -37,12 +37,13 @@
 
 
 
-DnsQuery::DnsQuery(SocketInterface *sock)
+DnsQuery::DnsQuery(SocketInterface *sock,const char* hostname, char* ipaddress)
 {
     socket = sock;
+    this->getHostByName(hostname, ipaddress);
 }
 
-bool DnsQuery::gethostbyname(const char* hostname, char* resolvedIp)
+bool DnsQuery::getHostByName(const char* hostname, char* resolvedIp)
 {
     char * dnsIPs[] = {
         "8.8.8.8",