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: Tue, 5 Jun 2012 11:13:49 -0400

 

> But I wonder, if both ends do close the socket normally, would the PCB
end up in a TIME_WAIT?


The reason for the TIME_WAIT (past the successful and ACK'd closes) is
to make sure wandering left-over packets don't show up in a newly opened
socket.  Without the TIME_WAIT, some intermediate router could
retransmit something, and bogus data could be injected into the newly
opened stream using the old port numbers.

So the TIME_WAIT is to let all packets floating around "out there" from
that connection fully "decay".  The point is to avoid re-use of ports
too soon.

Marty



reply via email to

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