Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CRouteCache Class Reference

#include <RouteCache.h>

List of all members.

Public Member Functions

 CRouteCache ()
virtual ~CRouteCache ()
void SetDuration (DWORD nSeconds)
BOOL Add (const GGUID *pGUID, const CNeighbour *pNeighbour)
BOOL Add (const GGUID *pGUID, const SOCKADDR_IN *pEndpoint)
void Remove (CNeighbour *pNeighbour)
void Clear ()
CRouteCacheItemAdd (const GGUID *pGUID, const CNeighbour *pNeighbour, const SOCKADDR_IN *pEndpoint, DWORD tAdded)
CRouteCacheItemLookup (const GGUID *pGUID, CNeighbour **ppNeighbour=NULL, SOCKADDR_IN *pEndpoint=NULL)

Protected Attributes

DWORD m_nSeconds
CRouteCacheTable m_pTable [2]
CRouteCacheTablem_pRecent
CRouteCacheTablem_pHistory


Constructor & Destructor Documentation

CRouteCache::CRouteCache  ) 
 

Definition at line 45 of file RouteCache.cpp.

References m_nSeconds, m_pHistory, m_pRecent, and m_pTable.

CRouteCache::~CRouteCache  )  [virtual]
 

Definition at line 52 of file RouteCache.cpp.


Member Function Documentation

CRouteCacheItem * CRouteCache::Add const GGUID pGUID,
const CNeighbour pNeighbour,
const SOCKADDR_IN *  pEndpoint,
DWORD  tAdded
 

Definition at line 110 of file RouteCache.cpp.

References CRouteCacheTable::Add(), CRouteCacheTable::GetNextSize(), CRouteCacheTable::IsFull(), m_nSeconds, m_pHistory, m_pRecent, NULL, and CRouteCacheTable::Resize().

BOOL CRouteCache::Add const GGUID pGUID,
const SOCKADDR_IN *  pEndpoint
 

Definition at line 87 of file RouteCache.cpp.

References CRouteCacheTable::Add(), CRouteCacheTable::GetNextSize(), CRouteCacheTable::IsFull(), Lookup(), m_nSeconds, m_pHistory, m_pRecent, NULL, and CRouteCacheTable::Resize().

BOOL CRouteCache::Add const GGUID pGUID,
const CNeighbour pNeighbour
 

Definition at line 65 of file RouteCache.cpp.

References CRouteCacheTable::Add(), CRouteCacheTable::GetNextSize(), CRouteCacheTable::IsFull(), Lookup(), m_nSeconds, m_pHistory, m_pRecent, NULL, and CRouteCacheTable::Resize().

Referenced by CQueryHit::FromPacket(), Lookup(), CNeighbour::OnCommonHit(), CG2Neighbour::OnHAW(), CDatagrams::OnHit(), CG1Neighbour::OnPing(), CG2Neighbour::OnQuery(), CG1Neighbour::OnQuery(), CDatagrams::OnQuery(), and CG2Neighbour::SendHAW().

void CRouteCache::Clear  ) 
 

Definition at line 160 of file RouteCache.cpp.

References CRouteCacheTable::Clear(), and m_pTable.

Referenced by CNeighboursWithG1::Close(), CNetwork::Disconnect(), and SetDuration().

CRouteCacheItem * CRouteCache::Lookup const GGUID pGUID,
CNeighbour **  ppNeighbour = NULL,
SOCKADDR_IN *  pEndpoint = NULL
 

Definition at line 128 of file RouteCache.cpp.

References Add(), CRouteCacheTable::Find(), CRouteCacheItem::m_pEndpoint, CRouteCacheItem::m_pGUID, m_pHistory, CRouteCacheItem::m_pNeighbour, m_pRecent, CRouteCacheItem::m_tAdded, and NULL.

Referenced by Add(), CNetwork::GetNodeRoute(), CNeighboursWithG2::GetRandomHub(), CG1Neighbour::OnPong(), CG1Neighbour::OnPush(), CDatagrams::OnQueryAck(), and CNetwork::RouteHits().

void CRouteCache::Remove CNeighbour pNeighbour  ) 
 

Definition at line 154 of file RouteCache.cpp.

References m_pTable, and CRouteCacheTable::Remove().

Referenced by CNeighboursWithG1::Remove(), and CNeighboursBase::Remove().

void CRouteCache::SetDuration DWORD  nSeconds  ) 
 

Definition at line 59 of file RouteCache.cpp.

References Clear(), and m_nSeconds.

Referenced by CNetwork::Connect(), and CNeighboursWithG1::Connect().


Member Data Documentation

DWORD CRouteCache::m_nSeconds [protected]
 

Definition at line 84 of file RouteCache.h.

Referenced by Add(), CRouteCache(), and SetDuration().

CRouteCacheTable* CRouteCache::m_pHistory [protected]
 

Definition at line 87 of file RouteCache.h.

Referenced by Add(), CRouteCache(), and Lookup().

CRouteCacheTable* CRouteCache::m_pRecent [protected]
 

Definition at line 86 of file RouteCache.h.

Referenced by Add(), CRouteCache(), and Lookup().

CRouteCacheTable CRouteCache::m_pTable[2] [protected]
 

Definition at line 85 of file RouteCache.h.

Referenced by Clear(), CRouteCache(), and Remove().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:11 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2