TCP reconnetion error code -9 or -11

SPENCER
Posts: 1
Joined: Tue Jul 11, 2017 3:23 pm

TCP reconnetion error code -9 or -11

Postby SPENCER » Wed Jul 12, 2017 9:30 am

Hi, I'd like to know that what is the meaning of error code back from the TCP reconnetion back function. It gets err code(-11) or err code(-9) sometimes. I think that is why I can't connect to TCP server. Thanks so much.

pratik

Re: TCP reconnetion error code -9 or -11

Postby pratik » Mon Jul 24, 2017 6:39 pm

Here is a snippet from espconn.h which will be helpful!
Note that LwIP sources are open and you can check the error codes from source files easily. Takes a minute only :)

Code: Select all

#define ESPCONN_OK          0    /* No error, everything OK. */
#define ESPCONN_MEM        -1    /* Out of memory error.     */
#define ESPCONN_TIMEOUT    -3    /* Timeout.                 */
#define ESPCONN_RTE        -4    /* Routing problem.         */
#define ESPCONN_INPROGRESS  -5    /* Operation in progress    */
#define ESPCONN_MAXNUM      -7    /* Total number exceeds the set maximum*/

#define ESPCONN_ABRT       -8    /* Connection aborted.      */
#define ESPCONN_RST        -9    /* Connection reset.        */
#define ESPCONN_CLSD       -10   /* Connection closed.       */
#define ESPCONN_CONN       -11   /* Not connected.           */

#define ESPCONN_ARG        -12   /* Illegal argument.        */
#define ESPCONN_IF         -14    /* UDP send error          */
#define ESPCONN_ISCONN     -15   /* Already connected.       */

#define ESPCONN_HANDSHAKE  -28   /* ssl handshake failed    */
#define ESPCONN_SSL_INVALID_DATA  -61   /* ssl application invalid    */

Who is online

Users browsing this forum: No registered users and 64 guests