Home | Trees | Index | Help |
---|
Package twisted :: Package protocols :: Module htb :: Class Bucket |
|
Token bucket, or something like it.
I can hold up to a certain number of tokens, and I drain over time.Method Summary | |
---|---|
__init__(self,
parentBucket)
| |
int |
Add tokens to me. |
bool |
Let some of the bucket drain. |
Class Variable Summary | |
---|---|
int | maxburst
- Size of the bucket, in bytes. |
int | rate
- Rate the bucket drains, in bytes per second. |
int |
_refcount
|
Method Details |
---|
add(self, amount)Add tokens to me.
|
drip(self)Let some of the bucket drain. How much of the bucket drains depends on how long it has been since I was last called.
|
Class Variable Details |
---|
maxburstSize of the bucket, in bytes. If None, the bucket is never full.
|
rateRate the bucket drains, in bytes per second. If None, the bucket drains instantaneously.
|
_refcount
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Fri Jun 27 03:48:28 2003 | http://epydoc.sf.net |