[Top][All Lists]

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

[lwip-devel] [task #6930] Impelemt SO_LINGER

From: Simon Goldschmidt
Subject: [lwip-devel] [task #6930] Impelemt SO_LINGER
Date: Wed, 23 May 2007 10:44:38 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20070309 Firefox/

Follow-up Comment #2, task #6930 (project lwip):

Re comment #1
As Jonathan said in bug #19157:
"SO_DONTLINGER is a non-standard option. I would be against its provision in
lwIP on that basis"

That's my point of view, too. Anyway, can't linger be turned off by calling
setsockopt(SO_LINGER) with l_onoff=0? Doesn't that achieve the same?

http://docs.hp.com/en/B2355-90136/ch03s01.html seems a little different from
because the opengroup specification allows l_linger to provide a time,
whereas hp only sets it on or off. Still, the HP link provides a good


* If l_onoff is zero, close returns immediately, but any unsent data is
transmitted (after close returns).
* If l_onoff is nonzero and l_linger is zero, close returns immediately, and
any unsent data is discarded.
* If l_onoff is nonzero and l_linger is nonzero, close does not return until
all unsent data is transmitted (or the connection is closed by the remote

In the default case (SO_LINGER is off), close is not blocked. The socket
itself, however, goes through graceful disconnect, and no data is lost.


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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