Uploads pieces to a Peer.
More...
#include <peeruploader.h>
- Author
- Joris Guisson 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 62 of file peeruploader.h.
◆ PeerUploader()
bt::PeerUploader::PeerUploader |
( |
Peer * |
peer | ) |
|
Constructor. Set the Peer.
- Parameters
-
◆ addRequest()
void bt::PeerUploader::addRequest |
( |
const Request & |
r | ) |
|
Add a Request to the list of Requests.
- Parameters
-
◆ clearAllRequests()
void bt::PeerUploader::clearAllRequests |
( |
| ) |
|
Clear all pending requests.
◆ handleRequests()
Update the PeerUploader. This will check if there are Request, and will try to handle them.
- Parameters
-
- Returns
- The number of bytes uploaded
◆ removeRequest()
void bt::PeerUploader::removeRequest |
( |
const Request & |
r | ) |
|
Remove a Request from the list of Requests.
- Parameters
-
The documentation for this class was generated from the following file: