[Ns-bugs] [Bug 154] Attach sockets to nodes
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Thu Mar 27 10:13:23 PDT 2008
http://www.nsnam.org/bugzilla/show_bug.cgi?id=154
------- Comment #4 from gjcarneiro at gmail.com 2008-03-27 13:13 -------
(In reply to comment #3)
> (In reply to comment #2)
> > Holding sockets in some class, be it Application or otherwise, is more work
> > than needed. NS-3 can save the programmer work by doing this work by itself,
>
> I understand you feel pretty strongly that this is a user bug which can be
> avoided but,
>
> > with little cost.
>
> The memory cost is not "little" so, I am very uneasy about this proposal,
> especially since there is another fix, as outlined in my previous comment. I am
> also pretty uneasy about this proposed change because I really think that it is
> a bug to create a socket, release it, and expect it to stay around while you
> run the simulation.
The memory cost is one pointer per socket. Surely that is negligible. Same
problem as keeping a list of applications in the Node.
>
> Furthermore, I have a very hard time to see how your proposal would gracefully
> deal with appearing and disappearing sockets: how can you (user) make sure that
> a socket is really released ? Do you have to go into the array attached to the
> node and remove it from there ? _that_ sounds really bad.
Like I said, I would envision socket->Close() to take care of it. Or even if a
socket is closed from the remote side, the Node could then release its
reference to it (since a closed socket cannot be used for communication
anymore).
--
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