lwip-users
[Top][All Lists]
Advanced

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

Re: RE : [lwip-users] Problem with lwip_close in TCP


From: Kieran Mansley
Subject: Re: RE : [lwip-users] Problem with lwip_close in TCP
Date: Tue, 13 Jun 2006 16:52:49 +0100

On Tue, 2006-06-13 at 17:42 +0200, Frédéric BERNON wrote:
> Hi Christiaan,
> 
> You're right, this is the same problem. I will study this issue, because I 
> want to keep the BSD compatibility. Perhaps adding "somewhere" a tcp_output 
> call? I will tell you.

tcp_output() on it's own won't be sufficient.  The most general example
of the problem is where you have queued up so much data that you are no
longer able to send due to the receive window being closed.  You must
then wait for ACKs from the other side that open the window, and allow
you to drain the send queue.  This could take a very long time as the
other side might never acknowledge the data, or might acknowledge it but
keep the window closed for some reason.  

Perhaps a simpler approach would be for tcp_close() to just put the FIN
in the send queue behind all the data and arrange for something to call
tcp_output if we ever get window space to send some more.  It could then
return immediately (which isn't really sockets API compatible, I think)
and the data would make its own way out.  There is probably a fatal flaw
in this, I've only thought about it for a few seconds, and haven't
looked at the source in a while!

Kieran





reply via email to

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