libktorrent  2.2.0
Public Member Functions | Static Public Attributes | List of all members
dht::KBucketEntry Class Reference

#include <kbucketentry.h>

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

Public Member Functions

 KBucketEntry ()
 
 KBucketEntry (const KBucketEntry &other)
 
 KBucketEntry (const net::Address &addr, const Key &id)
 
virtual ~KBucketEntry ()
 Destructor.
 
const net::AddressgetAddress () const
 Get the socket address of the node.
 
const KeygetID () const
 Get it's ID.
 
void hasResponded ()
 Signal the entry that the peer has responded.
 
bool isBad () const
 Is it a bad node. (Hasn't responded to a query.
 
bool isGood () const
 Is this node a good node.
 
bool isQuestionable () const
 Is this node questionable (haven't heard from it in the last 15 minutes)
 
void onPingQuestionable ()
 The entry has been pinged because it is questionable.
 
bool operator< (const KBucketEntry &entry) const
 < operator
 
KBucketEntryoperator= (const KBucketEntry &other)
 
bool operator== (const KBucketEntry &entry) const
 Equality operator.
 
void requestTimeout ()
 A request timed out.
 

Static Public Attributes

static KBucketEntry null
 The null entry.
 

Detailed Description

Author
Joris Guisson

Entry in a KBucket, it basically contains an ip_address of a node, the udp port of the node and a node_id.

Definition at line 55 of file kbucketentry.h.

Constructor & Destructor Documentation

◆ KBucketEntry() [1/3]

dht::KBucketEntry::KBucketEntry ( )

Constructor, sets everything to 0.

Returns

◆ KBucketEntry() [2/3]

dht::KBucketEntry::KBucketEntry ( const net::Address addr,
const Key id 
)

Constructor, set the ip, port and key

Parameters
addrsocket address
idID of node

◆ KBucketEntry() [3/3]

dht::KBucketEntry::KBucketEntry ( const KBucketEntry other)

Copy constructor.

Parameters
otherKBucketEntry to copy
Returns

Member Function Documentation

◆ operator=()

KBucketEntry& dht::KBucketEntry::operator= ( const KBucketEntry other)

Assignment operator.

Parameters
otherNode to copy
Returns
this KBucketEntry

The documentation for this class was generated from the following file: