On Fri, 2009-03-20 at 09:10 +0100, Reither, Robert (AU14) wrote: > This means, lwip still holds the pcb for 2*TCP_MSL == 120s and than > frees the pcb in tcp_slowtmr. > > Is this the correct style, I mean the client has already terminated > the connection, why does lwip still wait for some response ??
Yes, this is correct. TCP is very cautious about delayed packets from one connection interfering with a later connection, and so it holds one end in TIME_WAIT to prevent the same port numbers being used for a while. This isn't lwIP specific - it's part of every TCP. That said, there have been lots of attempts to subvert this behaviour: windows for example will use RSTs rather than a FIN to close a connection sometimes, and there is an SO_REUSEADDR socket option that (if implemented - I doubt it is in lwIP) allows you to reuse the ports that are in TIME_WAIT in some circumstances. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
