Problem with tcp client cb function

sunweili50
Posts: 8
Joined: Sun Oct 23, 2016 9:25 am

Problem with tcp client cb function

Postby sunweili50 » Sun Nov 06, 2016 8:03 pm

i m test the tcp client in the esp8266-rtos-sample-code project.
the esp8266 can connect to the server(PC) successfully.
but when i close the socket from PC side, it seems the esp8266 don't enter the "TcpReconnectCb" or "TcpClientDisConnect" call back funtion.
and instead,the esp8266 print follow debug message:

Code: Select all

espconn_client_recv, espconn_client_close, err:0, p:       0
espconn_client_close, close

whats the problem? i want to realize the tcp client reconnect to the server automatically when socket disconnect occur.

thanks

ESP_Xutao
Posts: 134
Joined: Tue Sep 27, 2016 5:42 pm

Re: Problem with tcp client cb function

Postby ESP_Xutao » Fri Dec 16, 2016 3:52 pm

Hi:
You can user espconn_init() function have a test.

Code: Select all

printf("test new compile..\n");
   espconn_init();
xTaskCreate(TcpLocalClient_Test,"TcpLocalClient_Test",500,NULL,6,NULL);

Who is online

Users browsing this forum: No registered users and 56 guests