Oskar Sandberg <md98-osa at nada.kth.se> wrote:
> On Wed, Aug 23, 2000 at 10:02:39PM +0100, Theodore Hong wrote:
> > Well, TCP has a flow-control mechanism built into it -- it depends on how
> > your TCP stack is implemented, of course, but it strikes me that if your
> > application stops reading data out of a socket for a while and the OS
> > buffers fill up, the OS should stop sending ACKs back to the sender, in
> > which case the sender takes this as a signal to slow down.  If too much
> > time passes before starting to receive ACKs again, however, the sender will
> > close the connection.
> 
> It doesn't strike me as a very sexy way of achieving this.

hm?  All you have to do is read data from the socket at the rate you want
to process it.  If you don't want data yet, don't read it.  Everything else
happens automatically.  The sender's TCP stack should adapt itself to send
at the rate that you read.  There's no need to try to implement flow
control at the application level...

theo

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to