net.i2p.client.streaming.impl
Class ConnThrottler
java.lang.Object
net.i2p.client.streaming.impl.ConnThrottler
class ConnThrottler
- extends Object
Count how often we have received an incoming connection
This offers basic DOS protection but is not a complete solution.
- Since:
- 0.7.14
Constructor Summary |
ConnThrottler(int max,
int totalMax,
long period)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnThrottler
ConnThrottler(int max,
int totalMax,
long period)
updateLimits
public void updateLimits(int max,
int totalMax)
shouldThrottle
boolean shouldThrottle(Hash h)
- Checks both individual and total. Increments before checking.
isThrottled
boolean isThrottled(Hash h)
- Checks individual count only. Does not increment.
- Since:
- 0.9.3