lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] RE: Why the tcp_pcb haven't been free when I calltcp_close(


From: geckook Xu
Subject: [lwip-users] RE: Why the tcp_pcb haven't been free when I calltcp_close()
Date: Fri, 16 Mar 2007 23:48:27 +0800

But the tcp_pcb haven't been free for a long time,and my stack can not work.

When I add a new thread to do with the received data, then the tcp_pcb
would be free. In this cast, I use the message box to communicate
between the stack and the other thread. But when the tcp_pcb have been
exhausted,  message box will block for a long time (about 2 seconds).
What is the metter?
but when I do with the received data in the tcp_rcvd callback
function, In this case, the tcp_pcb couldn't be free.
Are there anything should be take attention to?


yes ,when call tcp_close(),they go to FIN_WAIT1,
I reduce the TCP_FIN_WAIT_TIMEOUT and the TCP_MSL values, but my 100
tcp_pcb have been exhausted.
I find it from the mem states.

Reducing the FIN_WAIT and TIME_WAIT timeouts is not something I would
recommend unless you know for sure that it will not cause you problems.
These are mechanisms that TCP uses to ensure reliable connections and
reliable transmission of data.  I'm afraid that if you have a lot of
connections in TIME_WAIT you either have to wait until they time out and
become available for reuse, reduce your connection rate so that you
don't run out in the first place, or configure more pcbs.  This isn't
due to the way lwIP is implemented - it is due to the way TCP is
designed, and would be true for all RFC compliant TCP stacks.




reply via email to

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