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: LWIPInterface NetworkSocketAPI mbed-rtos mbed
Fork of HelloESP8266Interface by
Diff: main.cpp
- Revision:
- 59:14d6716bc772
- Parent:
- 58:7033f5893210
- Child:
- 65:826ec2bbec51
diff -r 7033f5893210 -r 14d6716bc772 main.cpp
--- a/main.cpp Tue Apr 05 15:32:00 2016 -0500
+++ b/main.cpp Tue Apr 05 23:40:09 2016 +0000
@@ -25,7 +25,6 @@
}
LWIPInterface eth;
-TCPSocket socket(ð);
int main()
{
@@ -39,7 +38,11 @@
const char *mac = eth.get_mac_address();
printf("IP Address is: %s\r\n", (ip) ? ip : "No IP");
printf("MAC Address is: %s\r\n", (mac) ? mac : "No MAC");
+
+ SocketAddress addr(ð, "time-a.nist.gov", 37);
+ printf("time-a.nist.gov resolved to: %s\r\n", addr.get_ip_address());
+ TCPSocket socket(ð);
socket.connect("time-a.nist.gov", 37);
char recieved[100] = {0};
