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.
Dependencies: DnsQuery
Dependents: WizFi310_TCP_Echo_Server_Example
Fork of NetworkSocketAPI by
Diff: NetworkInterface.cpp
- 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;
+}
