modified by ohneta

Dependencies:   DnsQuery ESP8266Interface NetworkSocketAPI mbed

Fork of HelloESP8266Interface by NetworkSocketAPI

Revision:
9:da5a230fa4f4
Parent:
7:6787b920b496
Child:
11:b7e531a4d661
diff -r cb6e31861ac9 -r da5a230fa4f4 main.cpp
--- a/main.cpp	Wed Jun 17 21:04:47 2015 +0000
+++ b/main.cpp	Wed Jun 17 23:38:33 2015 +0000
@@ -44,6 +44,18 @@
     printf("Gateway: %s\n", wifi.getGateway());
     printf("Mask: %s\n", wifi.getNetworkMask());
     printf("MAC: %s\n", wifi.getMACAddress());
+    
+    //Endpoint google;
+    wifi.set_address(wifi.get_host_by_name("www.google.com"));
+    wifi.set_address("216.58.192.46");
+    wifi.set_port(80);
+    
+    //Socket socket;
+    char buf[1024];
+    wifi.connect(*wifi.endpoint);
+    wifi.recv(buf, 1024);
+    wifi.send(buf, sizeof(buf));
+    wifi.close(*wifi.endpoint);
 
     wifi.disconnect();