server/client

Dependencies:   mbed NetServicesMin

tcp_error.cpp

Committer:
recotana
Date:
2012-02-23
Revision:
1:6e61ee662fd3
Parent:
0:432b571e11a3

File content as of revision 1:6e61ee662fd3:

#include "mbed.h"
#include "tcp_error.h"
#include "TCPSocket.h"

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){
     printf("%s\r\n",tcpErrMes[err]) ;
}