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

CNeighboursBase Class Reference

#include <NeighboursBase.h>

Inheritance diagram for CNeighboursBase:

CNeighboursWithG1 CNeighboursWithG2 CNeighboursWithED2K CNeighboursWithRouting CNeighboursWithConnect CNeighbours List of all members.

Public Member Functions

 CNeighboursBase ()
virtual ~CNeighboursBase ()
POSITION GetIterator () const
CNeighbourGetNext (POSITION &pos) const
CNeighbourGet (DWORD nUnique) const
CNeighbourGet (IN_ADDR *pAddress) const
int GetCount (PROTOCOLID nProtocol, int nState, int nNodeType) const
BOOL NeighbourExists (PROTOCOLID nProtocol, int nState, int nNodeType) const
virtual void Connect ()
virtual void Close ()
virtual void OnRun ()

Public Attributes

DWORD m_nStableCount
DWORD m_nLeafCount
DWORD m_nLeafContent
DWORD m_nBandwidthIn
DWORD m_nBandwidthOut

Protected Member Functions

virtual void Add (CNeighbour *pNeighbour, BOOL bAssignUnique=TRUE)
virtual void Remove (CNeighbour *pNeighbour)

Protected Attributes

CMapPtrToPtr m_pUniques
DWORD m_nUnique
DWORD m_nRunCookie

Friends

class CNeighbour
class CShakeNeighbour
class CEDNeighbour

Constructor & Destructor Documentation

CNeighboursBase::CNeighboursBase  ) 
 

Definition at line 40 of file NeighboursBase.cpp.

References m_nBandwidthIn, m_nBandwidthOut, m_nLeafContent, m_nLeafCount, m_nRunCookie, m_nStableCount, and m_nUnique.

CNeighboursBase::~CNeighboursBase  )  [virtual]
 

Definition at line 51 of file NeighboursBase.cpp.

References Close().


Member Function Documentation

void CNeighboursBase::Add CNeighbour pNeighbour,
BOOL  bAssignUnique = TRUE
[protected, virtual]
 

Definition at line 248 of file NeighboursBase.cpp.

References m_nUnique, m_pUniques, and NULL.

Referenced by CShakeNeighbour::AttachTo(), CNeighbour::CNeighbour(), CShakeNeighbour::ConnectTo(), and CEDNeighbour::ConnectTo().

void CNeighboursBase::Close  )  [virtual]
 

Reimplemented in CNeighbours, and CNeighboursWithG1.

Definition at line 168 of file NeighboursBase.cpp.

References GetIterator(), GetNext(), m_nBandwidthIn, m_nBandwidthOut, m_nLeafContent, m_nLeafCount, and m_nStableCount.

Referenced by CNeighboursWithG1::Close(), and ~CNeighboursBase().

void CNeighboursBase::Connect  )  [virtual]
 

Reimplemented in CNeighbours, CNeighboursWithG1, and CNeighboursWithG2.

Definition at line 161 of file NeighboursBase.cpp.

Referenced by CNeighboursWithG1::Connect().

CNeighbour * CNeighboursBase::Get IN_ADDR *  pAddress  )  const
 

Definition at line 82 of file NeighboursBase.cpp.

References GetIterator(), GetNext(), CConnection::m_pHost, and NULL.

CNeighbour * CNeighboursBase::Get DWORD  nUnique  )  const
 

Definition at line 75 of file NeighboursBase.cpp.

References m_pUniques, and NULL.

Referenced by CNeighboursWithConnect::ConnectTo(), CNeighboursWithG2::CreateQueryWeb(), CManagedSearch::ExecuteDonkeyMesh(), CManagedSearch::ExecuteG2Mesh(), CNeighboursWnd::GetItem(), CNetwork::IsConnectedTo(), CNeighbourTipCtrl::OnCalcSize(), CHostCacheWnd::OnHostCacheDisconnect(), CNeighbourTipCtrl::OnPaint(), CNeighbourTipCtrl::OnPrepare(), CDatagrams::OnQueryKeyAnswer(), CNeighbourTipCtrl::OnTimer(), CHostCacheWnd::OnUpdateHostCacheDisconnect(), CChatWindows::OpenPrivate(), CRemote::PageNetwork(), CNeighboursWithED2K::PushDonkey(), CEDClients::RunGlobalStatsRequests(), and CG2Neighbour::SendKHL().

int CNeighboursBase::GetCount PROTOCOLID  nProtocol,
int  nState,
int  nNodeType
const
 

Definition at line 99 of file NeighboursBase.cpp.

References CNeighbour::m_nNodeType, CNeighbour::m_nProtocol, CNeighbour::m_nState, CNetwork::m_pSection, m_pUniques, and Network.

Referenced by CNeighboursWithG2::CreateQueryWeb(), CGraphItem::GetValue(), CDatagrams::OnCrawlRequest(), CShakeNeighbour::OnHeadersCompleteG1(), CShakeNeighbour::OnHeadersCompleteG2(), CDiscoveryServices::RunWebCacheUpdate(), CDiscoveryServices::Update(), and CHomeViewCtrl::Update().

POSITION CNeighboursBase::GetIterator  )  const
 

Definition at line 59 of file NeighboursBase.cpp.

References m_pUniques.

Referenced by CCrawlSession::Bootstrap(), CNeighboursWithRouting::Broadcast(), Close(), CNeighboursWithED2K::CloseDonkeys(), CLocalSearch::CreatePacketG2(), CNeighboursWithG2::CreateQueryWeb(), CManagedSearch::ExecuteG2Mesh(), CManagedSearch::ExecuteNeighbours(), Get(), CNeighboursWithED2K::GetDonkeyServer(), CUploadTransferHTTP::GetNeighbourList(), CNetwork::GetNodeRoute(), CNeighboursWithG2::GetRandomHub(), CNeighboursWithConnect::IsHubLoaded(), CNeighboursWithConnect::Maintain(), CNeighboursWithConnect::NeedMoreHubs(), CNeighboursWithConnect::NeedMoreLeafs(), CPacketWnd::OnContextMenu(), CDatagrams::OnCrawlRequest(), CNeighboursWithG1::OnG1Ping(), CNeighboursWithG1::OnG1Pong(), CG2Neighbour::OnPing(), CG1Neighbour::OnPing(), OnRun(), CRemote::PageNetworkNetwork(), CNeighboursWithConnect::PeerPrune(), CNeighboursWithRouting::RouteQuery(), CNeighboursWithED2K::SendDonkeyDownload(), CG2Neighbour::SendHAW(), CG2Neighbour::SendKHL(), CG2Neighbour::SendLNI(), CNeighboursWnd::Update(), and CHomeConnectionBox::Update().

CNeighbour * CNeighboursBase::GetNext POSITION &  pos  )  const
 

Definition at line 64 of file NeighboursBase.cpp.

References m_pUniques.

Referenced by CCrawlSession::Bootstrap(), CNeighboursWithRouting::Broadcast(), Close(), CNeighboursWithED2K::CloseDonkeys(), CLocalSearch::CreatePacketG2(), CNeighboursWithG2::CreateQueryWeb(), CManagedSearch::ExecuteG2Mesh(), CManagedSearch::ExecuteNeighbours(), Get(), CNeighboursWithED2K::GetDonkeyServer(), CUploadTransferHTTP::GetNeighbourList(), CNetwork::GetNodeRoute(), CNeighboursWithG2::GetRandomHub(), CNeighboursWithConnect::IsHubLoaded(), CNeighboursWithConnect::Maintain(), CNeighboursWithConnect::NeedMoreHubs(), CNeighboursWithConnect::NeedMoreLeafs(), CPacketWnd::OnContextMenu(), CDatagrams::OnCrawlRequest(), CNeighboursWithG1::OnG1Ping(), CNeighboursWithG1::OnG1Pong(), CG2Neighbour::OnPing(), CG1Neighbour::OnPing(), OnRun(), CRemote::PageNetworkNetwork(), CNeighboursWithConnect::PeerPrune(), CNeighboursWithRouting::RouteQuery(), CNeighboursWithED2K::SendDonkeyDownload(), CG2Neighbour::SendHAW(), CG2Neighbour::SendKHL(), CG2Neighbour::SendLNI(), CNeighboursWnd::Update(), and CHomeConnectionBox::Update().

BOOL CNeighboursBase::NeighbourExists PROTOCOLID  nProtocol,
int  nState,
int  nNodeType
const
 

Definition at line 130 of file NeighboursBase.cpp.

References CNeighbour::m_nNodeType, CNeighbour::m_nProtocol, CNeighbour::m_nState, CNetwork::m_pSection, m_pUniques, and Network.

void CNeighboursBase::OnRun  )  [virtual]
 

Reimplemented in CNeighbours, and CNeighboursWithConnect.

Definition at line 185 of file NeighboursBase.cpp.

References CConnection::DoRun(), GetIterator(), GetNext(), CConnection::m_mInput, CConnection::m_mOutput, m_nBandwidthIn, m_nBandwidthOut, CNeighbour::m_nFileVolume, m_nLeafContent, m_nLeafCount, CNeighbour::m_nNodeType, CNeighbour::m_nRunCookie, m_nRunCookie, m_nStableCount, CNeighbour::m_nState, CNetwork::m_pSection, CConnection::m_tConnected, CConnection::Measure(), Network, TCPBandwidthMeter::nMeasure, nrsConnected, and ntLeaf.

Referenced by CNeighboursWithConnect::OnRun().

void CNeighboursBase::Remove CNeighbour pNeighbour  )  [protected, virtual]
 

Reimplemented in CNeighboursWithG1.

Definition at line 265 of file NeighboursBase.cpp.

References m_pUniques, Network, CNetwork::NodeRoute, CNetwork::QueryRoute, and CRouteCache::Remove().

Referenced by CNeighboursWithG1::Remove().


Friends And Related Function Documentation

friend class CEDNeighbour [friend]
 

Definition at line 67 of file NeighboursBase.h.

Referenced by CNeighboursWithConnect::ConnectTo().

friend class CNeighbour [friend]
 

Reimplemented in CNeighbours.

Definition at line 65 of file NeighboursBase.h.

friend class CShakeNeighbour [friend]
 

Reimplemented in CNeighbours.

Definition at line 66 of file NeighboursBase.h.

Referenced by CNeighboursWithConnect::ConnectTo(), and CNeighboursWithConnect::OnAccept().


Member Data Documentation

DWORD CNeighboursBase::m_nBandwidthIn
 

Definition at line 46 of file NeighboursBase.h.

Referenced by Close(), CNeighboursBase(), CGraphItem::GetValue(), and OnRun().

DWORD CNeighboursBase::m_nBandwidthOut
 

Definition at line 47 of file NeighboursBase.h.

Referenced by Close(), CNeighboursBase(), CGraphItem::GetValue(), and OnRun().

DWORD CNeighboursBase::m_nLeafContent
 

Definition at line 45 of file NeighboursBase.h.

Referenced by Close(), CNeighboursBase(), and OnRun().

DWORD CNeighboursBase::m_nLeafCount
 

Definition at line 44 of file NeighboursBase.h.

Referenced by Close(), CNeighboursBase(), CUploadQueue::GetBandwidthLimit(), and OnRun().

DWORD CNeighboursBase::m_nRunCookie [protected]
 

Definition at line 41 of file NeighboursBase.h.

Referenced by CNeighboursBase(), and OnRun().

DWORD CNeighboursBase::m_nStableCount
 

Definition at line 43 of file NeighboursBase.h.

Referenced by Close(), CNeighboursBase(), CNetwork::IsWellConnected(), and OnRun().

DWORD CNeighboursBase::m_nUnique [protected]
 

Definition at line 40 of file NeighboursBase.h.

Referenced by Add(), and CNeighboursBase().

CMapPtrToPtr CNeighboursBase::m_pUniques [protected]
 

Definition at line 39 of file NeighboursBase.h.

Referenced by Add(), Get(), GetCount(), GetIterator(), GetNext(), NeighbourExists(), and Remove().


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