libktorrent
2.2.0
|
Uploads pieces to a Peer. More...
#include <peeruploader.h>
Public Member Functions | |
PeerUploader (Peer *peer) | |
void | addRequest (const Request &r) |
void | addUploadedBytes (Uint32 bytes) |
void | clearAllRequests () |
Uint32 | getNumRequests () const |
Get the number of requests. | |
Uint32 | handleRequests (bt::ChunkManager &cman) |
void | removeRequest (const Request &r) |
This class handles the uploading of pieces to a Peer. It keeps track of a list of Request objects. All these Requests where sent by the Peer. It will upload the pieces to the Peer, making sure that the maximum upload rate isn't surpassed.
Definition at line 44 of file peeruploader.h.
void bt::PeerUploader::addRequest | ( | const Request & | r | ) |
void bt::PeerUploader::clearAllRequests | ( | ) |
Clear all pending requests.
Uint32 bt::PeerUploader::handleRequests | ( | bt::ChunkManager & | cman | ) |
Update the PeerUploader. This will check if there are Request, and will try to handle them.
cman | The ChunkManager |
void bt::PeerUploader::removeRequest | ( | const Request & | r | ) |