lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwip raw TCP client.


From: Pomeroy, Marty
Subject: Re: [lwip-users] lwip raw TCP client.
Date: Mon, 4 Jun 2012 07:23:58 -0400

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]