#include <announcetask.h>
|
| AnnounceTask (Database *db, RPCServer *rpc, Node *node, const dht::Key &info_hash, bt::Uint16 port, QObject *parent) |
|
void | callFinished (RPCCall *c, RPCMsg::Ptr rsp) override |
|
void | callTimeout (RPCCall *c) override |
|
bool | takeItem (DBItem &item) |
|
void | update () override |
|
| Task (RPCServer *rpc, Node *node, QObject *parent) |
|
void | addDHTNode (const QString &ip, bt::Uint16 port) |
|
bool | canDoRequest () const |
| See if we can do a request.
|
|
void | emitDataReady () |
|
bt::Uint32 | getNumOutstandingRequests () const |
| Get the number of outstanding requests.
|
|
bool | isFinished () const |
| Is the task finished.
|
|
bool | isQueued () const |
|
void | kill () |
| Kills the task.
|
|
void | onResponse (RPCCall *c, RPCMsg::Ptr rsp) override |
| Decrements the outstanding_reqs.
|
|
void | onTimeout (RPCCall *c) override |
| Decrements the outstanding_reqs.
|
|
bool | rpcCall (RPCMsg::Ptr req) |
|
void | start () |
|
void | start (const KClosestNodesSearch &kns, bool queued) |
|
| RPCCallListener (QObject *parent) |
|
◆ callFinished()
void dht::AnnounceTask::callFinished |
( |
RPCCall * |
c, |
|
|
RPCMsg::Ptr |
rsp |
|
) |
| |
|
overridevirtual |
A call is finished and a response was received.
- Parameters
-
c | The call |
rsp | The response |
Implements dht::Task.
◆ callTimeout()
void dht::AnnounceTask::callTimeout |
( |
RPCCall * |
c | ) |
|
|
overridevirtual |
A call timedout
- Parameters
-
Implements dht::Task.
◆ takeItem()
bool dht::AnnounceTask::takeItem |
( |
DBItem & |
item | ) |
|
Take one item from the returned values. Returns false if there is no item to take.
- Parameters
-
- Returns
- false if no item to take, true else
◆ update()
void dht::AnnounceTask::update |
( |
| ) |
|
|
overridevirtual |
Will continue the task, this will be called every time we have rpc slots available for this task. Should be implemented by derived classes.
Implements dht::Task.
The documentation for this class was generated from the following file: