NetworkSocketAPI

Dependencies:   DnsQuery

Dependents:   HelloWizFi250Interface

Fork of NetworkSocketAPI by NetworkSocketAPI

Branch:
api-changes
Revision:
31:7f15b95f2a1d
Parent:
30:3cc78f5db99d
Child:
39:47138420ea42
--- a/NetworkInterface.cpp	Mon Feb 22 21:03:38 2016 +0000
+++ b/NetworkInterface.cpp	Mon Feb 22 22:51:03 2016 +0000
@@ -15,6 +15,8 @@
  */
 
 #include "NetworkInterface.h"
+#include "UDPSocket.h"
+#include "DnsQuery.h"
 #include <string.h>
 
 NetworkInterface::NetworkInterface()
@@ -59,3 +61,9 @@
     return getIPAddress() != 0;
 }
 
+int32_t NetworkInterface::getHostByName(const char *name, char *ip)
+{
+    UDPSocket sock(this);
+    DnsQuery dns(&sock, name, ip);
+    return 0;
+}