[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #10370] Raw API: Callback for received FIN to confirm
[lwip-devel] [task #10370] Raw API: Callback for received FIN to confirm connection is closed
Tue, 11 May 2010 16:59:16 +0000
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.00
Follow-up Comment #3, task #10370 (project lwip):
I think that this callback should always come up. How else would an
application know what happened with its close request?
I think that calling it with p == NULL is the best way to inform the
application that the link is closed or going to be closed, as it was a month
Generally (p==NULL) is enough for the application to know that the link is no
The err argument could reveal more info on what is going on in case we need
to know. For example:
ERR_OK - peer ACKed our close request, the link can no longer carry data in
either direction. We should clean up and free the PCB (probably outside the
ERR_CLSD - the peer actively closes the connection (FIN), he has nothing more
to send to us (while we MAY be able to tell him "good bye" before we close the
connection on our side). He expects FIN+ACK from us (does he?).
ERR_ABRT - the peer sent us RST, he aborted the connection on its side. We
MUST not send him more data. The application might still be able to get some
data which was received before the RST was received.
Such behavior will let older applications work with lwip 1.4.0 with less
By the way, currently the callback is always called with err=ERR_OK.
Reply to this item at:
Message sent via/by Savannah