Libevent Code Doxygen document
Public Attributes | List of all members
ev_token_bucket Struct Reference

#include <ratelim-internal.h>

Public Attributes

ev_ssize_t read_limit
 
ev_ssize_t write_limit
 
ev_uint32_t last_updated
 

Detailed Description

A token bucket is an internal structure that tracks how many bytes we are currently willing to read or write on a given bufferevent or group of bufferevents

Member Data Documentation

◆ last_updated

ev_uint32_t ev_token_bucket::last_updated

When was this bucket last updated? Measured in abstract 'ticks' relative to the token bucket configuration.

◆ read_limit

ev_ssize_t ev_token_bucket::read_limit

How many bytes are we willing to read or write right now? These values are signed so that we can do "defecit spending"


The documentation for this struct was generated from the following file: