Code:
_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");
}
Statistics: Posted by FrenkR — Sun Jul 10, 2016 2:26 am