|
libktorrent
2.1.1
|
Communicates with the tracker. More...
#include <httptracker.h>
Public Member Functions | |
| HTTPTracker (const QUrl &url, TrackerDataSource *tds, const PeerID &id, int tier) | |
| void | completed () override |
| Uint32 | failureCount () const override |
| void | scrape () override |
| void | start () override |
| void | stop (WaitJob *wjob=0) override |
Public Member Functions inherited from bt::Tracker | |
| Tracker (const QUrl &url, TrackerDataSource *tds, const PeerID &id, int tier) | |
| int | getTier () const |
| Get the trackers tier. | |
| void | handleFailure () |
| Handle a failure. | |
| void | timedDelete (int ms) |
| QUrl | trackerURL () const |
| get the tracker url | |
Public Member Functions inherited from bt::PeerSource | |
| void | addPeer (const net::Address &addr, bool local=false) |
| bool | takePeer (net::Address &addr, bool &local) |
Public Member Functions inherited from bt::TrackerInterface | |
| TrackerInterface (const QUrl &url) | |
| Uint32 | getInterval () const |
| int | getNumLeechers () const |
| Get the number of leechers. | |
| int | getNumSeeders () const |
| Get the number of seeders. | |
| int | getTotalTimesDownloaded () const |
| Get the number of times the torrent was downloaded. | |
| bool | isEnabled () const |
| Is the tracker enabled. | |
| bool | isStarted () const |
| See if a start request succeeded. | |
| virtual void | reset () |
| Reset the tracker. | |
| void | setEnabled (bool on) |
| Enable or disable the tracker. | |
| void | setInterval (Uint32 i) |
| Set the interval. | |
| Uint32 | timeToNextUpdate () const |
| Get the time in seconds to the next tracker update. | |
| TrackerStatus | trackerStatus () const |
| Get the tracker status. | |
| QString | trackerStatusString () const |
| Get a string of the current tracker status. | |
| QUrl | trackerURL () const |
| get the tracker url | |
Static Public Member Functions | |
| static void | setProxy (const QString &proxy, const bt::Uint16 proxy_port) |
| static void | setProxyEnabled (bool on) |
| static void | setUseQHttp (bool on) |
Static Public Member Functions inherited from bt::Tracker | |
| static QString | getCustomIP () |
| Get the custom ip to use, null if none is set. | |
| static void | setCustomIP (const QString &str) |
Additional Inherited Members | |
Public Slots inherited from bt::Tracker | |
| void | manualUpdate () override=0 |
Public Slots inherited from bt::PeerSource | |
| virtual void | aboutToBeDestroyed () |
| virtual void | manualUpdate () |
Signals inherited from bt::Tracker | |
| void | requestFailed (const QString &failure_reason) |
| void | requestOK () |
| void | requestPending () |
| void | scrapeDone () |
| void | stopDone () |
Signals inherited from bt::PeerSource | |
| void | peersReady (PeerSource *ps) |
Protected Member Functions inherited from bt::Tracker | |
| Uint64 | bytesDownloaded () const |
| Calculates the bytes downloaded to send with the request. | |
| Uint64 | bytesUploaded () const |
| Calculates the bytes uploaded to send with the request. | |
| void | failed (const QString &err) |
| Emit the failure signal, and set the error. | |
| void | resetTrackerStats () |
| Reset the tracker stats. | |
Protected Attributes inherited from bt::Tracker | |
| Uint64 | bytes_downloaded_at_start |
| Uint64 | bytes_uploaded_at_start |
| Uint32 | key |
| PeerID | peer_id |
| QTimer | reannounce_timer |
| TrackerDataSource * | tds |
| int | tier |
Protected Attributes inherited from bt::TrackerInterface | |
| bool | enabled |
| QString | error |
| Uint32 | interval |
| int | leechers |
| QDateTime | request_time |
| int | seeders |
| bool | started |
| TrackerStatus | status |
| int | total_downloaded |
| QUrl | url |
| QString | warning |
Definition at line 45 of file httptracker.h.
|
overridevirtual |
The torrent has finished downloading. This is optional and should be used by HTTP and UDP tracker sources to notify the tracker.
Reimplemented from bt::PeerSource.
|
inlineoverridevirtual |
Get the number of failed attempts to reach a tracker.
Implements bt::Tracker.
Definition at line 55 of file httptracker.h.
|
overridevirtual |
Do a tracker scrape to get more accurate stats about a torrent. Does nothing if the tracker does not support this.
Implements bt::Tracker.
|
overridevirtual |
Start gathering peers.
Implements bt::PeerSource.
|
overridevirtual |
Stop gathering peers.
Implements bt::PeerSource.
1.8.18