org.alliance.core.comm.throttling
Class BandwidthThrottle

java.lang.Object
  extended by org.alliance.core.comm.throttling.BandwidthThrottle

public class BandwidthThrottle
extends java.lang.Object

based on code from limewire


Constructor Summary
BandwidthThrottle(CoreSubsystem core, float bytesPerSecond)
           
 
Method Summary
 void bytesProcessed(int bytes)
           
 int request(Connection c, int desired)
           
 void setRate(float bytesPerSecond)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BandwidthThrottle

public BandwidthThrottle(CoreSubsystem core,
                         float bytesPerSecond)
Method Detail

setRate

public void setRate(float bytesPerSecond)

request

public int request(Connection c,
                   int desired)

bytesProcessed

public void bytesProcessed(int bytes)