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.
Revision 1:7634d07c4310, committed 2016-09-26
- Comitter:
- JMF
- Date:
- Mon Sep 26 18:32:48 2016 +0000
- Parent:
- 0:50979ffa39b6
- Child:
- 2:8fb99c9f5075
- Commit message:
- changed the blocking from TRUE to have a 1 second timeout.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Sep 21 15:33:53 2016 +0000
+++ b/main.cpp Mon Sep 26 18:32:48 2016 +0000
@@ -113,7 +113,7 @@
printf("sent buffer to UDP IP/Port (ret=%d)" CRLF "Now try receiving." CRLF,ret);
- usock.set_blocking (true, 1000);
+ usock.set_blocking (false, 1000);
char in_buffer[50];
int n = usock.receiveFrom(nist, in_buffer, sizeof(in_buffer));
Avnet ATT WNC 14A2A Cellular IoT Kit