Mats The behavior of sockets, even after being closed, they stick around for a little while in TIME_WAIT state. This allows acks to complete, etc.
You cannot re-open that socket until that expires. For more details, Google TIME_WAIT. If you wait a couple of minutes, can you then reconnect? If the test server is Windows, run TCPView, cuz that shows sockets that are still in TIME_WAIT state. Hope this helps! Marty > Opening a socket using: > rTcpConnect=tcp_connect(tcp_pcb, &ip, 2020, mainTcpConnectAccept); > Works fine, as it seems. My test server says new client IP=xxx.xxx.xxx.xxx. > Closing the socket using: > tcp_close(tcp_pcb); > Also works fine, as it seems. My test server says socket closed by client. > But when I try to connect again, I get: > tcp_connect: can only connected from state CLOSED _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
