#include <connectionlimit.h>
Maintains the connection limit. It uses a Token for that.
Definition at line 53 of file connectionlimit.h.
◆ acquire()
Token::Ptr bt::ConnectionLimit::acquire |
( |
const SHA1Hash & |
hash | ) |
|
Request a token for a given torrent
- Parameters
-
hash | Info hash of the torrent |
- Returns
- ConnectionLimit::Token::Ptr a valid token if a connection can be opened, a 0 pointer if not
◆ release()
void bt::ConnectionLimit::release |
( |
const Token & |
token | ) |
|
|
protected |
Release one Token. Will be done by destructor of Token.
- Parameters
-
◆ setLimits()
void bt::ConnectionLimit::setLimits |
( |
bt::Uint32 |
global_limit, |
|
|
bt::Uint32 |
torrent_limit |
|
) |
| |
Set the connection limits
- Parameters
-
global_limit | Global limit |
torrent_limit | Per torrent limit |
The documentation for this class was generated from the following file: