Code: Select all
_iRes = espconn_get_connection_info(&httpdSvr, &_clientConn, 0);
if (_iRes == ESPCONN_OK){
// disconnect all
int _i;
for (_i = httpdSvr.link_cnt -1; _i >= 0; _i--){
memcpy(httpdSvr.proto.tcp->remote_ip, _clientConn[_i].remote_ip, 4);
httpdSvr.proto.tcp->remote_port = _clientConn[_i].remote_port;
_iRes = espconn_abort(&httpdSvr); // abort called instead "espconn_disconnect" to force disconnect socket
}
_iRes = espconn_delete(&httpdSvr);
if (_iRes != ESPCONN_OK){
if (_iRes == ESPCONN_INPROGRESS) //
os_printf("TCP server connection in progress");
}
problem here is that on "espconn_delete()" I am getting error ESPCONN_INPROGRESS. Is there any way to "force" stop listening and to disable TCP server?
Rgds,
Frenk