Classes | Namespaces | Typedefs | Enumerations
rate_limiter.hpp File Reference

Classes for rate-limiting. More...

#include "event_handler.hpp"
#include <atomic>
#include <vector>
Include dependency graph for rate_limiter.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  rate_limit_manager
 Context for rate_limiters. More...
class  bucket_base
 Base class for buckets. More...
class  rate_limiter
 A limiter for the attached buckets. More...
class  bucket
 A rate-limited token bucket. More...


 The namespace used by libfilezilla.


using type = uint64_t


enum  : type { unlimited = static_cast<type>(-1) }
enum  type : size_t { inbound , outbound }

Detailed Description

Classes for rate-limiting.

Rate-limiting is done using token buckets with hierarchical limits. Rate is distributed fairly between buckets, with any overflow distributed between buckets still having capacity.