#include <KademliaNodeHandle.h>

Public Member Functions | |
| KademliaBucketEntry () | |
| Constructs an unspecified NodeHandle. | |
| KademliaBucketEntry (const NodeHandle &handle, simtime_t prox=MAXTIME) | |
| KademliaBucketEntry (const OverlayKey &key, const IPvXAddress &ip, int port) | |
| Complete constructor. | |
| simtime_t | getRtt () const |
| void | setRtt (simtime_t rtt) |
| uint8_t | getStaleCount () const |
| void | setStaleCount (uint8_t staleCount) |
| void | resetStaleCount () |
| void | incStaleCount () |
| void | setLastSeen (simtime_t lastSeen) |
| simtime_t | getLastSeen () |
Private Attributes | |
| uint8_t | staleCount |
| simtime_t | lastSeen |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const KademliaBucketEntry &n) |
Definition at line 28 of file KademliaNodeHandle.h.
| KademliaBucketEntry::KademliaBucketEntry | ( | ) | [inline] |
Constructs an unspecified NodeHandle.
Definition at line 34 of file KademliaNodeHandle.h.
00035 : ProxNodeHandle() 00036 { 00037 staleCount = 0; 00038 }
| KademliaBucketEntry::KademliaBucketEntry | ( | const NodeHandle & | handle, | |
| simtime_t | prox = MAXTIME | |||
| ) | [inline] |
Definition at line 40 of file KademliaNodeHandle.h.
00041 : ProxNodeHandle(handle) 00042 { 00043 staleCount = 0; 00044 this->prox.proximity = SIMTIME_DBL(prox); 00045 this->prox.accuracy = 1.0; 00046 }
| KademliaBucketEntry::KademliaBucketEntry | ( | const OverlayKey & | key, | |
| const IPvXAddress & | ip, | |||
| int | port | |||
| ) | [inline] |
Complete constructor.
| key | The OverlayKey | |
| ip | The IPvXAddress | |
| port | The UDP-Port |
Definition at line 55 of file KademliaNodeHandle.h.
00058 : ProxNodeHandle(NodeHandle(key, ip, port)) 00059 { 00060 staleCount = 0; 00061 }
| simtime_t KademliaBucketEntry::getLastSeen | ( | ) | [inline] |
| simtime_t KademliaBucketEntry::getRtt | ( | ) | const [inline] |
Definition at line 64 of file KademliaNodeHandle.h.
Referenced by Kademlia::routingAdd().
00064 { return getProx(); } //deprecated
| uint8_t KademliaBucketEntry::getStaleCount | ( | ) | const [inline] |
| void KademliaBucketEntry::incStaleCount | ( | ) | [inline] |
| void KademliaBucketEntry::resetStaleCount | ( | ) | [inline] |
| void KademliaBucketEntry::setLastSeen | ( | simtime_t | lastSeen | ) | [inline] |
| void KademliaBucketEntry::setRtt | ( | simtime_t | rtt | ) | [inline] |
| void KademliaBucketEntry::setStaleCount | ( | uint8_t | staleCount | ) | [inline] |
Definition at line 69 of file KademliaNodeHandle.h.
Referenced by resetStaleCount().
00069 { this->staleCount = staleCount; }
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const KademliaBucketEntry & | n | |||
| ) | [friend] |
Definition at line 84 of file KademliaNodeHandle.h.
00086 { 00087 os << (NodeHandle)n << " " << n.prox.proximity; 00088 return os; 00089 };
simtime_t KademliaBucketEntry::lastSeen [private] |
uint8_t KademliaBucketEntry::staleCount [private] |
Definition at line 81 of file KademliaNodeHandle.h.
Referenced by getStaleCount(), incStaleCount(), and KademliaBucketEntry().
1.5.8