lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] A closed pcb stays for 120seconds in the tcp_tw_pcbs. R


From: Kieran Mansley
Subject: Re: [lwip-users] A closed pcb stays for 120seconds in the tcp_tw_pcbs. Right or wrong?
Date: Wed, 22 Dec 2004 16:28:26 +0000

On Wed, 2004-12-22 at 07:27 -0800, Michael Anburaj wrote:
> Hi Kieran,
> 
> Does'nt solve my problem though. So, if a closed pcb
> is going to stay in the tcp_tw_pcbs list for 120
> seconds (which means will be available to use after
> this period only), then like in my case there is a
> very good chance of all the 8 pcb's getting used up
> within this period & run out of space when calling
> tcp_listen() again <after 8 times>.

Yes, a TCP stack dealing with short-lived connections where the
application calls close() (rather than the connection being closed from
the other end) will typically have most of its pcbs in the TIME_WAIT
state.  There is not a lot you can do about this and still conform to
the protocol.  That said, some stacks allow the pcb to move out of
TIME_WAIT on sending/receiving a RST.  This isn't necessarily a good
idea though:  http://www.faqs.org/rfcs/rfc1337.html  You could also
reduce the length of the TCP_MSL to a less conservative value, at the
risk of receiving duplicate packets from an old connection.

Kieran





reply via email to

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