modified by ohneta

Dependents:   HelloESP8266Interface_mine

Fork of DnsQuery by Sarah Marsh

Revision:
4:7e64d099f63e
Parent:
3:5705fdae6185
Child:
5:7555d509b568
--- a/DnsQuery.h	Thu Aug 27 14:33:07 2015 +0000
+++ b/DnsQuery.h	Tue Nov 10 14:37:17 2015 +0000
@@ -25,9 +25,9 @@
     /** Constructor to instantiate a DnsQuery object.
       * @param wifi : A valid pointer to a UDP socket
       */
-    DnsQuery(SocketInterface* sock,const char* hostname, char* ipaddress);
+    DnsQuery(SocketInterface* sock,const char* hostname, char* ipaddress, const char *dnsIp = NULL);
  
-   
+    void setPreferredDNSServerIP(const char *dnsIp);  
 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
@@ -45,10 +45,13 @@
     bool parseRR(char *resp, int& c, char* adr );
 
 protected:
+    const char* _preferred_dnsip;
     char* _dnsip;
     char* _string_ip;
     SocketInterface* socket;
     
+    
+    
 };
 
 #endif // __DNSQUERY_H__
\ No newline at end of file