![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
UDPversion
Dependencies: XBee mbed NetServicesMin
Diff: tcpip/tcp_error.cpp
- Revision:
- 0:84a3b029656e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tcpip/tcp_error.cpp Sat Apr 14 03:53:45 2012 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "tcp_error.h" +#include "TCPSocket.h" +extern Serial pc; +char tcpErrMes[8][100]={ + "TCPSOCKET_SETUP TCPSocket not properly configured.\r\n", + "TCPSOCKET_TIMEOUT Connection timed out.\r\n", + "TCPSOCKET_IF Interface has problems, does not exist or is not initialized.\r\n", + "TCPSOCKET_MEM Not enough mem.\r\n", + "TCPSOCKET_INUSE Interface / Port is in use.\r\n", + "TCPSOCKET_EMPTY Connections queue is empty.\r\n", + "TCPSOCKET_RST Connection was reset by remote host.\r\n", + "TCPSOCKET_OK Success.\r\n" +}; + +void dispTcpError(TCPSocketErr err){ + pc.printf("%s\r\n",tcpErrMes[err]) ; +} \ No newline at end of file