• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

dht::KBucketEntry

dht::KBucketEntry Class Reference

#include <kbucket.h>

Inheritance diagram for dht::KBucketEntry:

Inheritance graph
[legend]

List of all members.


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 65 of file kbucket.h.


Public Member Functions

const KInetSocketAddress & getAddress () const
const Key & getID () const
void hasResponded ()
bool isBad () const
bool isGood () const
bool isQuestionable () const
 KBucketEntry (const KBucketEntry &other)
 KBucketEntry (const KInetSocketAddress &addr, const Key &id)
 KBucketEntry ()
void onPingQuestionable ()
KBucketEntry & operator= (const KBucketEntry &other)
bool operator== (const KBucketEntry &entry) const
void requestTimeout ()
virtual ~KBucketEntry ()

Static Public Attributes

static KBucketEntry null

Constructor & Destructor Documentation

dht::KBucketEntry::KBucketEntry (  ) 

Constructor, sets everything to 0.

Returns:

Definition at line 36 of file kbucket.cpp.

dht::KBucketEntry::KBucketEntry ( const KInetSocketAddress &  addr,
const Key &  id 
)

Constructor, set the ip, port and key.

Parameters:
addr socket address
id ID of node

Definition at line 43 of file kbucket.cpp.

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

Copy constructor.

Parameters:
other KBucketEntry to copy
Returns:

Definition at line 51 of file kbucket.cpp.

dht::KBucketEntry::~KBucketEntry (  )  [virtual]

Destructor.

Definition at line 57 of file kbucket.cpp.


Member Function Documentation

const KInetSocketAddress& dht::KBucketEntry::getAddress (  )  const [inline]

Get the socket address of the node.

Definition at line 107 of file kbucket.h.

const Key& dht::KBucketEntry::getID (  )  const [inline]

Get it's ID.

Definition at line 110 of file kbucket.h.

void dht::KBucketEntry::hasResponded (  ) 

Signal the entry that the peer has responded.

Definition at line 100 of file kbucket.cpp.

bool dht::KBucketEntry::isBad (  )  const

Is it a bad node. (Hasn't responded to a query.

Definition at line 92 of file kbucket.cpp.

bool dht::KBucketEntry::isGood (  )  const

Is this node a good node.

Definition at line 75 of file kbucket.cpp.

bool dht::KBucketEntry::isQuestionable (  )  const

Is this node questionable (haven't heard from it in the last 15 minutes).

Definition at line 83 of file kbucket.cpp.

void dht::KBucketEntry::onPingQuestionable (  )  [inline]

The entry has been pinged because it is questionable.

Definition at line 128 of file kbucket.h.

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

Assignment operator.

Parameters:
other Node to copy
Returns:
this KBucketEntry

Definition at line 60 of file kbucket.cpp.

bool dht::KBucketEntry::operator== ( const KBucketEntry &  entry  )  const

Equality operator.

Definition at line 70 of file kbucket.cpp.

void dht::KBucketEntry::requestTimeout (  )  [inline]

A request timed out.

Definition at line 125 of file kbucket.h.


Member Data Documentation

KBucketEntry dht::KBucketEntry::null [static]

The null entry.

Definition at line 131 of file kbucket.h.


The documentation for this class was generated from the following files:
  • kbucket.h
  • kbucket.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal