public interface BandwidthListener
Modifier and Type | Method and Description |
---|---|
void |
downloaded(int size)
We unconditionally received this many bytes
|
long |
getDownBWLimit()
Current limit in BPS
|
long |
getDownloadRate()
The average rate in Bps
|
long |
getUpBWLimit()
Current limit in BPS
|
long |
getUploadRate()
The average rate in Bps
|
boolean |
overDownBWLimit()
Are we currently over the limit?
|
boolean |
overUpBWLimit()
Are we currently over the limit?
|
boolean |
shouldRequest(Peer peer,
int size)
Should we request this many bytes?
|
boolean |
shouldSend(int size)
Should we send this many bytes?
Do NOT call uploaded() if this returns true.
|
void |
uploaded(int size)
We unconditionally sent this many bytes
|
long getUploadRate()
long getDownloadRate()
void uploaded(int size)
void downloaded(int size)
boolean shouldSend(int size)
boolean shouldRequest(Peer peer, int size)
long getUpBWLimit()
long getDownBWLimit()
boolean overUpBWLimit()
boolean overDownBWLimit()