[Ns-bugs] [Bug 244] PacketSink is not multitasking

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Mon Jul 14 11:59:14 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=244





------- Comment #13 from raj.b at gatech.edu  2008-07-14 14:59 -------
I agree this implicit copy could get potentially hairy if you weren't expecting
this behavior, just as Mathieu's question illustrates.  Copying the callbacks
seemed to be the most natural idea from my perspective, given our choice of
using the copy constructor to fork sockets.  Is this something we fix by adding
sufficient documentation about the behavior of forking TCP sockets?  People
using this code to write TCP apps can always override and set the callbacks
themselves if the implicit copy is the wrong thing to do (via
Socket::SetRecvCallback).  I think this is as good of an option as any if the
user knows to do this, which is why I propose documentation.  It just needs to
be clear what the default behavior is and how to change it if you want to.

As a kind of orthogonal issue, the implicitness of all of this code DOES throw
me off just a little, so perhaps we should make these copies explicit instead
of auto generated anyway?


-- 
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