mbed Sensor node for Instrumented Booth over ETH.
Dependencies: EthernetInterface-1 MaxbotixDriver Presence HTU21D_TEMP_HUMID_SENSOR_SAMPLE Resources SHARPIR mbed-rtos mbed-src WDT_K64F nsdl_lib
Fork of Trenton_Switch_LPC1768_ETH by
Revision 3:aab73431f03b, committed 2013-09-14
- Comitter:
- Kojto
- Date:
- Sat Sep 14 15:06:37 2013 +0000
- Parent:
- 2:c8cdcef31933
- Child:
- 4:b5875efcf0e5
- Commit message:
- error handling inside tcp_connection
Changed in this revision
tcp_ip_demo.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/tcp_ip_demo.cpp Fri Sep 13 18:06:44 2013 +0000 +++ b/tcp_ip_demo.cpp Sat Sep 14 15:06:37 2013 +0000 @@ -57,7 +57,20 @@ stat = server.send((void *)python_msg, strlen(python_msg), 0); printf("status= %d\n", stat); } else { - printf("bad socket= %d\n", stat); + printf("ERROR %d", stat); + switch (stat) { + case -1: + printf(": remote socket closed.\n"); + break; + case -2: + printf(": no buffers available.\n"); + break; + case -57: + printf(": timeout - no reply from remote.\n"); + break; + default: + printf("\n"); + } } server.close(); printf("Done, press any key to repeat\n");