[Ns-bugs] [Bug 131] Sending data in the TCP send callback causes infinite recursion

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Wed Feb 6 06:48:39 PST 2008


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





------- Comment #1 from raj.b at gatech.edu  2008-02-06 09:48 -------
If you'd like to send TCP data "as fast as possible" you just need write all of
the data into the socket, all at once.  Since flow and congestion control are
implemented, the socket will buffer the data you write to the socket, and will
send it appropriately according to its flow/congestion algorithms.  See
examples/tcp-large-transfer.cc 

It seems to me that that if you wanted to send data one chunk at a time with
your approach, that it should be up to your code to check to see if you are out
of data, and if so, don't call Send.  Doesn't this break the loop of which you
speak?

    Quote:I would expect TCP to eventually stop calling me
    to send more data, for some time...

To clarify some about the implementation, the registered callback gets called
whenever data is actually sent down the stack...the semantics are more like a
notification of sent data, not necessarily a request for more data.


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