RTOS SDK 1.4.0 espconn_tcp_set_max_con_allow crashes the code

gustavo
Posts: 24
Joined: Thu Apr 28, 2016 6:01 pm

RTOS SDK 1.4.0 espconn_tcp_set_max_con_allow crashes the code

Postby gustavo » Thu Nov 10, 2016 7:19 pm

Hello,
the following code crashes:

Code: Select all

static struct espconn conn;
conn.type = ESPCONN_TCP;
conn.state = ESPCONN_NONE;
conn.proto.tcp = (esp_tcp *)zalloc(sizeof(esp_tcp));
conn.proto.tcp->local_port = port;
espconn_regist_connectcb(&conn, onNewClient);
espconn_accept(&conn);
espconn_tcp_set_max_con_allow(&conn, 2);
espconn_regist_time(&conn, CLIENT_TIMEOUT_S, 0);


If I remove the "espconn_tcp_set_max_con_allow" it does not.

I'm using RTOS SDK v1.4.0.

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

Re: RTOS SDK 1.4.0 espconn_tcp_set_max_con_allow crashes the code

Postby ESP_Xutao » Mon Dec 05, 2016 6:10 pm

Hi:
Do you want to creat TCP_Server?you can consult our TCP_Server sample code,our sample code is ok.the link is:https://github.com/espressif/esp8266-rtos-sample-code/tree/master/04Protocal/TCP_Server_Demo

Who is online

Users browsing this forum: No registered users and 2 guests