我用ESP8266做client向HTTP sever发送post请求,发送一段时间之后,调用espconn_send就会返回ESPCONN_MEM,我是等上一包数据发完之后,进入了sent callback,然后再发下一包,我不知道tcp_pcb是在哪儿close和删除的,我尝试在disconnect callback和reconnect callback中调用espconn_delete或espconn_disconnect,都不行,不知道问题出在哪儿.
void ICACHE_FLASH_ATTR disconnect_callback(void *arg)
{
struct espconn *conn = (struct espconn *)arg;
sint8 error = espconn_delete(conn);
//sint8 error = espconn_disconnect(conn);
if(conn == NULL)
return;
if(conn->proto.tcp != NULL) {
os_free(conn->proto.tcp);
conn->proto.tcp = NULL;
}
os_free(conn);
user_conn = NULL;
if(error != 0){
char str[30];
os_sprintf(str, " delete err: %d", error);
uart0_sendStr(str);
}
}
esp8266向http server发送post请求,发送一段时间之后,会返回ESPCONN_MEM错我
Who is online
Users browsing this forum: No registered users and 127 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.