This Socket Example Program Implements a TCP Socket, UDP Socket, and HTTPClient socket then uses each of these to perform basic I/O.

Dependencies:   JSON M2XStreamClient-JMF WNCInterface mbed-rtos mbed

See the README for details on this example program. NOTE: When started, the program can take up to 40 seconds before it will respond. This delay is the time required for the WNC Data Module to connect with the network.

Files at this revision

API Documentation at this revision

Comitter:
JMF
Date:
Wed Nov 23 00:48:12 2016 +0000
Parent:
6:562eed9eca87
Child:
8:052b1f397814
Commit message:
Intermediate update for HTTPSClient support;

Changed in this revision

HTTPClient-JMF.lib Show annotated file Show diff for this revision Revisions of this file
WNCInterface.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/HTTPClient-JMF.lib	Tue Nov 22 15:23:34 2016 +0000
+++ b/HTTPClient-JMF.lib	Wed Nov 23 00:48:12 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/JMF/code/HTTPClient-JMF/#7a307f0ee478
+https://developer.mbed.org/users/JMF/code/HTTPClient-JMF/#2a8019d6f08d
--- a/WNCInterface.lib	Tue Nov 22 15:23:34 2016 +0000
+++ b/WNCInterface.lib	Wed Nov 23 00:48:12 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/Avnet/code/WNCInterface/#fded23f50479
+https://developer.mbed.org/teams/Avnet/code/WNCInterface/#6bc40ac8b054
--- a/main.cpp	Tue Nov 22 15:23:34 2016 +0000
+++ b/main.cpp	Wed Nov 23 00:48:12 2016 +0000
@@ -33,7 +33,7 @@
 //
 //demonstrate HTTPClient operations
 //
-    HTTPClient http;
+    HTTPClient  http;
     char str[512];
 
     printf("\n\n\n\n-------------------------------------" CRLF);
@@ -42,7 +42,7 @@
     //GET data
     printf(">>>>Fetch a page..." CRLF);
 
-    ret = http.get("http://developer.mbed.org/media/uploads/mbed_official/hello.txt", str, strlen(str));
+    ret = http.get("https://developer.mbed.org/media/uploads/mbed_official/hello.txt", str, strlen(str));
     if (!ret)
     {
       printf("Page fetched successfully - read %d characters" CRLF, strlen(str));