[Ns-bugs] [Bug 205] socket API documentation is unclear about close callback semantics
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Wed Jun 4 10:13:06 PDT 2008
http://www.nsnam.org/bugzilla/show_bug.cgi?id=205
mathieu.lacage at sophia.inria.fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |raj.b at gatech.edu, fw-
| |ns3 at strlen.de, tomh at tomh.org
------- Comment #1 from mathieu.lacage at sophia.inria.fr 2008-06-04 13:13 -------
I looked into this issue again and I have to confess that I still do not really
know how to update the current code/API.
1) The current tcp code invokes the close requested callback when it receives a
FIN from the remote.
2) In real TCP implementations, if A calls shutdown, we have the following
packet exchange: A -FIN-> B -FIN-> A -ACK-> B. If B was blocked on a read, the
read returns EOF when the first FIN is received.
3) In real TCP implementations, shutdown does not (it does not necessarily send
the FIN)
To summarize, we need to be notified when we receive a FIN initiated by the
other side. Let's call this halfCloseRequested. I see no need for any other
callback so, to make progress, I propose that we keep the halfClose callback in
SetConnectCallback and remove the others. I have no idea how we should update
the current TCP implementation.
Comments ?
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs
mailing list