Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of DnsQuery by
Diff: DnsQuery.h
- Revision:
- 3:5705fdae6185
- Parent:
- 2:12d08f0f20cf
- Child:
- 4:3749346dcd59
--- 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 );
 
    