modified by ohneta

Dependents:   HelloESP8266Interface_mine

Fork of DnsQuery by Sarah Marsh

Revision:
3:5705fdae6185
Parent:
2:12d08f0f20cf
Child:
4:7e64d099f63e
--- a/DnsQuery.h	Wed Aug 05 21:58:57 2015 +0000
+++ b/DnsQuery.h	Thu Aug 27 14:33:07 2015 +0000
@@ -25,22 +25,22 @@
     /** Constructor to instantiate a DnsQuery object.
       * @param wifi : A valid pointer to a UDP socket
       */
-    DnsQuery(SocketInterface* sock);
-    
-    
+    DnsQuery(SocketInterface* sock,const char* hostname, char* ipaddress);
+ 
+   
+private:   
     /** Function gethostbyname implements the functionality to query a domain name server for an IP-Address of a given hostname.
       * @param hostname : the hostname of interest as a string - format must be without http:// or www. IE google.com, mbed.org, etc
       * @param ipaddress : a reference to a IPADDRESS_t object which will receive the resolved IP Address of the host in question.
       * @returns true if successful, or false otherwise.
       */
-    bool gethostbyname(const char* hostname, char* ipaddress);
+    bool getHostByName(const char* hostname, char* ipaddress);
     /** Function gethostbyname implements the functionality to query a domain name server for an IP-Address of a given hostname.
       * @param hostname : the hostname of interest as a string.
       * @param ipaddress : a reference to a IPADDRESS_t object which will receive the resolved IP Address of the host in question.
       * @returns true if successful, or false otherwise.
       */
     bool getIP(const char* hostname, char* ipaddress);
-protected:
     bool resolve(char* resp, char* ipaddress);
     bool parseRR(char *resp, int& c, char* adr );