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: EthernetInterface mbed-rtos mbed
Revision 3:8be99be7f325, committed 2015-07-24
- Comitter:
- wolfSSL
- Date:
- Fri Jul 24 04:29:20 2015 +0000
- Parent:
- 2:f6177f2fc898
- Commit message:
- retry eth.connect
Changed in this revision
| client-tcp.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f6177f2fc898 -r 8be99be7f325 client-tcp.cpp
--- a/client-tcp.cpp Tue Jul 21 11:42:01 2015 +0000
+++ b/client-tcp.cpp Fri Jul 24 04:29:20 2015 +0000
@@ -111,7 +111,10 @@
TCPSocketConnection socket;
eth.init(); //Use DHCP
- eth.connect();
+ while(1) {
+ if(eth.connect() == 0)break ;
+ printf("Retry\n") ;
+ }
printf("Client Addr: %s\n", eth.getIPAddress());
getline("Server Addr: ", server_addr, sizeof(server_addr)) ;