lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] How to force-close a netconn from the server side?


From: address@hidden
Subject: Re: [lwip-users] How to force-close a netconn from the server side?
Date: Thu, 26 Jan 2017 15:42:40 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

Freddie Chopin wrote:
Would any additions to the netconn API be accepted

Yes.

or maybe the plan
is really to add a function or two to sockets to allow netconn-like
interface (with no copying) and then netconn would be deprecated?

That's the longterm plan only...

[..] It works only if I
introduce a small delay between close+delete and opening of new listen
connections (I'm using a multithreading system).[..]
With this code the PCBs are only sometimes stuck in TIME_WAIT state for
~2 minutes. But if I remove the "sleepFor()" call, then there is a PCB
(maybe more than one) stuck in FIN_WAIT_1 forever.

That's not strange, and has nothing to do with the tcpip-thread running but with receiving the remote host's FIN+ACK. FIN_WAIT_1 says that our FIN has been sent while TIME_WAIT says the FIN+ACK has been received (and ACKed) so the
connection is fully closed.

Just don't try to fix it like that, use SO_REUSE instead.

Simon



reply via email to

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