lwip-devel
[Top][All Lists]
Advanced

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

RE: [lwip-devel] Why the tcp_pcb haven't beenfree when Icalltcp_close()


From: Kieran Mansley
Subject: RE: [lwip-devel] Why the tcp_pcb haven't beenfree when Icalltcp_close()
Date: Fri, 16 Mar 2007 13:18:32 +0000

On Fri, 2007-03-16 at 13:58 +0100, Goldschmidt Simon wrote:
> Hi Kieran,
> 
> > > Does anyone know the answer (or why I saw it like this on 
> > the 2 OSes)?
> > 
> > It's all to do with possible retransmissions due to lost FINs 
> > or ACKs (or even I suppose very delayed duplicate packets 
> > from the middle of the
> >...
> 
> Thanks for the nice explanation. It's nearly what I've thought (though I
> didn't read it anywhere so was not sure). Only with my client/server
> application (winsock2...) TIME_WAIT state is not used at all if the
> client closes first.

Hmm, I'm aware that windows sometimes avoids the TCP closing state
machine by just using RST instead of FIN, but whichever side closes
first should otherwise end up in TIME_WAIT.  

> What I don't know for geckook's example is which side closes first, but
> that would be interesting to see...

The side that closes first goes through FIN_WAIT to TIME_WAIT and then
eventually CLOSED, the other one going through CLOSE_WAIT and LAST_ACK
to CLOSED.  As he's said it goes into FIN_WAIT, we can deduce that it is
the lwIP end that is closing first.

Kieran





reply via email to

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