Libevent Code Doxygen document
Public Member Functions | Public Attributes | List of all members
bufferevent_rate_limit_group Struct Reference
Collaboration diagram for bufferevent_rate_limit_group:
Collaboration graph
[legend]

Public Member Functions

 LIST_HEAD (rlim_group_member_list, bufferevent_private) members
 

Public Attributes

struct ev_token_bucket rate_limit
 
struct ev_token_bucket_cfg rate_limit_cfg
 
unsigned read_suspended: 1
 
unsigned write_suspended: 1
 
unsigned pending_unsuspend_read: 1
 
unsigned pending_unsuspend_write: 1
 
ev_uint64_t total_read
 
ev_uint64_t total_written
 
int n_members
 
ev_ssize_t min_share
 
ev_ssize_t configured_min_share
 
struct event master_refill_event
 
struct evutil_weakrand_state weakrand_seed
 
void * lock
 

Member Function Documentation

◆ LIST_HEAD()

bufferevent_rate_limit_group::LIST_HEAD ( rlim_group_member_list  ,
bufferevent_private   
)

List of all members in the group

Member Data Documentation

◆ lock

void* bufferevent_rate_limit_group::lock

Lock to protect the members of this group. This lock should nest within every bufferevent lock: if you are holding this lock, do not assume you can lock another bufferevent.

◆ master_refill_event

struct event bufferevent_rate_limit_group::master_refill_event

Timeout event that goes off once a tick, when the bucket is ready to refill.

◆ min_share

ev_ssize_t bufferevent_rate_limit_group::min_share

The smallest number of bytes that any member of the group should be limited to read or write at a time.

◆ n_members

int bufferevent_rate_limit_group::n_members

The number of bufferevents in the group.

◆ pending_unsuspend_read

unsigned bufferevent_rate_limit_group::pending_unsuspend_read

True iff we were unable to suspend one of the bufferevents in the group for reading the last time we tried, and we should try again.

◆ pending_unsuspend_write

unsigned bufferevent_rate_limit_group::pending_unsuspend_write

True iff we were unable to suspend one of the bufferevents in the group for writing the last time we tried, and we should try again.

◆ rate_limit

struct ev_token_bucket bufferevent_rate_limit_group::rate_limit

Current limits for the group.

◆ read_suspended

unsigned bufferevent_rate_limit_group::read_suspended

True iff we don't want to read from any member of the group.until the token bucket refills.

◆ total_read

ev_uint64_t bufferevent_rate_limit_group::total_read

Total number of bytes read or written in this group since last reset.

◆ weakrand_seed

struct evutil_weakrand_state bufferevent_rate_limit_group::weakrand_seed

Seed for weak random number generator. Protected by 'lock'

◆ write_suspended

unsigned bufferevent_rate_limit_group::write_suspended

True iff we don't want to write from any member of the group.until the token bucket refills.


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