There is another problem with your implementation. The Conduit needs to
synchronize on c.out, so that no other messages with be sent while it is
writing the trailing, but like you are doing it now, it is synchronizing on the
ThrottledOutputStream object, which is local anyways.

My recommendation would be put the ThrottledOutputstream around the
sockets Outputstream in the Connection on line 53 in tcpConnection.java. Any
reason not to do it already here?

Also, you put the class in Freenet.support, so it's should be in package
Freenet.support, which means you have to make the static throttledStream
message public, not package...

On Fri, 28 Apr 2000, Bill Trost wrote:
> It's in, it works, it's elegant.  I let it run all night last night,
> and beat on it pretty severely this morning, and have experienced no
> problems.
> 
> It only limits outgoing bandwidth, but that's all you can do in some
> sense, since incoming data is going to fill the operating system buffers
> no matter what sort of bandwidth limiting the appliciation does.
> 
> _______________________________________________
> Freenet-dev mailing list
> Freenet-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
-- 

Oskar Sandberg

md98-osa at nada.kth.se

#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

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

Reply via email to