BandwidthBucket.cc
Go to the documentation of this file.
19BandwidthBucket::BandwidthBucket(const int speed, const int initialLevelPercent, const double sizeLimit) :
bool noLimit() const
Whether this bucket will not do bandwidth limiting.
Definition: BandwidthBucket.h:41
void refillBucket()
Increases the bucket level with the writeSpeedLimit speed.
Definition: BandwidthBucket.cc:31
BandwidthBucket(const int speed, const int initialLevelPercent, const double sizeLimit)
Definition: BandwidthBucket.cc:19
virtual bool applyQuota(int &nleft, Comm::IoCallback *state)
Definition: BandwidthBucket.cc:66
virtual int quota()=0
static BandwidthBucket * SelectBucket(fde *f)
Definition: BandwidthBucket.cc:95
virtual void reduceBucket(const int len)
Decreases the bucket level.
Definition: BandwidthBucket.cc:83
Definition: ClientInfo.h:34
ClientInfo * clientInfo
pointer to client info used in client write limiter or nullptr if not present
Definition: fde.h:143
double current_dtime
the current UNIX time in seconds (with microsecond precision)
Definition: stub_libtime.cc:19
time_t getCurrentTime() STUB_RETVAL(0) int tvSubUsec(struct timeval