libktorrent  2.2.0
Public Member Functions | List of all members
dht::NodeLookup Class Reference

#include <nodelookup.h>

Inheritance diagram for dht::NodeLookup:
Inheritance graph
[legend]

Public Member Functions

 NodeLookup (const dht::Key &node_id, RPCServer *rpc, Node *node, QObject *parent)
 
void callFinished (RPCCall *c, RPCMsg::Ptr rsp) override
 
void callTimeout (RPCCall *c) override
 
void update () override
 
- Public Member Functions inherited from dht::Task
 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)
 
- Public Member Functions inherited from dht::RPCCallListener
 RPCCallListener (QObject *parent)
 

Additional Inherited Members

- Public Slots inherited from dht::RPCCallListener
- Signals inherited from dht::Task
void dataReady (Task *t)
 
void finished (Task *t)
 
- Protected Slots inherited from dht::Task
void onResolverResults (net::AddressResolver *res)
 
- Protected Member Functions inherited from dht::Task
void done ()
 
- Protected Attributes inherited from dht::Task
Nodenode
 
dht::KBucketEntrySet todo
 
dht::KBucketEntrySet visited
 

Detailed Description

Author
Joris Guisson joris.nosp@m..gui.nosp@m.sson@.nosp@m.gmai.nosp@m.l.com

Task to do a node lookup.

Definition at line 36 of file nodelookup.h.

Member Function Documentation

◆ callFinished()

void dht::NodeLookup::callFinished ( RPCCall c,
RPCMsg::Ptr  rsp 
)
overridevirtual

A call is finished and a response was received.

Parameters
cThe call
rspThe response

Implements dht::Task.

◆ callTimeout()

void dht::NodeLookup::callTimeout ( RPCCall c)
overridevirtual

A call timedout

Parameters
cThe call

Implements dht::Task.

◆ update()

void dht::NodeLookup::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: