Gnutella::Bootstrapping::UdpHostCache Class Reference

#include <UdpHostCache.h> [code]

Inherits QObject.

Inheritance diagram for Gnutella::Bootstrapping::UdpHostCache:

Inheritance graph
[legend]
Collaboration diagram for Gnutella::Bootstrapping::UdpHostCache:

Collaboration graph
[legend]
List of all members.

Detailed Description

Todo:
Check how much time we should wait before querying the same cache again.

Definition at line 41 of file UdpHostCache.h.

Public Slots

void addCache (const NodeAddress &)
void removeCache (const NodeAddress &)
void queryCache ()
void queryNode (const NodeAddress &)
 Sends a UDP ping to the node at address.

Signals

void receivedPong (const Pong &)

Public Member Functions

 UdpHostCache (UdpSwitch *, PingHandler *)
 ~UdpHostCache ()
bool loadCaches (const QString &filename)
bool storeCaches (const QString &filename)

Private Slots

void connectionAcceptedSlot (UdpConnection *)
void connectionFailedSlot ()
void connectionEstablishedSlot ()
void processPacket (Packet &, PacketSession *)
void closeSession (PacketSession *)

Private Member Functions

 UdpHostCache (const UdpHostCache &)
UdpHostCacheoperator= (const UdpHostCache &)
void doQuery (const NodeAddress &, CacheInfo *)
PacketSessioncreateSession (UdpConnection *)

Private Attributes

UdpHostCachePrivatep


Constructor & Destructor Documentation

Gnutella::Bootstrapping::UdpHostCache::UdpHostCache const UdpHostCache  )  [private]
 

UdpHostCache::UdpHostCache UdpSwitch ,
PingHandler
 

Definition at line 78 of file UdpHostCache.cpp.

UdpHostCache::~UdpHostCache  ) 
 

Definition at line 89 of file UdpHostCache.cpp.


Member Function Documentation

void UdpHostCache::addCache const NodeAddress  )  [slot]
 

Definition at line 97 of file UdpHostCache.cpp.

void UdpHostCache::closeSession PacketSession  )  [private, slot]
 

Definition at line 266 of file UdpHostCache.cpp.

void UdpHostCache::connectionAcceptedSlot UdpConnection  )  [private, slot]
 

Definition at line 178 of file UdpHostCache.cpp.

void UdpHostCache::connectionEstablishedSlot  )  [private, slot]
 

Definition at line 199 of file UdpHostCache.cpp.

void UdpHostCache::connectionFailedSlot  )  [private, slot]
 

Definition at line 184 of file UdpHostCache.cpp.

PacketSession * UdpHostCache::createSession UdpConnection  )  [private]
 

Definition at line 164 of file UdpHostCache.cpp.

void UdpHostCache::doQuery const NodeAddress ,
CacheInfo
[private]
 

Definition at line 149 of file UdpHostCache.cpp.

bool UdpHostCache::loadCaches const QString &  filename  ) 
 

Definition at line 282 of file UdpHostCache.cpp.

UdpHostCache& Gnutella::Bootstrapping::UdpHostCache::operator= const UdpHostCache  )  [private]
 

void UdpHostCache::processPacket Packet ,
PacketSession
[private, slot]
 

Definition at line 224 of file UdpHostCache.cpp.

void UdpHostCache::queryCache  )  [slot]
 

Definition at line 131 of file UdpHostCache.cpp.

void UdpHostCache::queryNode const NodeAddress address  )  [slot]
 

Sends a UDP ping to the node at address.

The difference to queryCache() is that we ping a normal Gnutella node over UDP. The caller has most probably picked a bunch of high uptime ones. We need to keep no stats for such nodes as we would for the "real" UHCs!

Definition at line 126 of file UdpHostCache.cpp.

void Gnutella::Bootstrapping::UdpHostCache::receivedPong const Pong  )  [signal]
 

void UdpHostCache::removeCache const NodeAddress  )  [slot]
 

Definition at line 109 of file UdpHostCache.cpp.

bool UdpHostCache::storeCaches const QString &  filename  ) 
 

Definition at line 310 of file UdpHostCache.cpp.


Member Data Documentation

UdpHostCachePrivate* Gnutella::Bootstrapping::UdpHostCache::p [private]
 

Definition at line 73 of file UdpHostCache.h.


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