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

CHostCacheHost Class Reference

#include <HostCache.h>

List of all members.

Public Member Functions

 CHostCacheHost ()
void Update (WORD nPort, DWORD tSeen=0, LPCTSTR pszVendor=NULL)
CNeighbourConnectTo (BOOL bAutomatic=FALSE)
CG1PacketToG1Ping (int nTTL=0, GGUID *pGUID=NULL)
CString ToString () const
BOOL CanConnect (DWORD tNow=0) const
BOOL CanQuote (DWORD tNow=0) const
BOOL CanQuery (DWORD tNow=0) const
void SetKey (DWORD nKey, IN_ADDR *pHost=NULL)

Public Attributes

CHostCacheHostm_pNextHash
CHostCacheHostm_pPrevTime
CHostCacheHostm_pNextTime
PROTOCOLID m_nProtocol
IN_ADDR m_pAddress
WORD m_nPort
CVendorm_pVendor
BOOL m_bPriority
DWORD m_nUserCount
DWORD m_nUserLimit
DWORD m_nFileLimit
CString m_sName
CString m_sDescription
DWORD m_nTCPFlags
DWORD m_nUDPFlags
DWORD m_tAdded
DWORD m_tSeen
DWORD m_tRetryAfter
DWORD m_tConnect
DWORD m_tQuery
DWORD m_tAck
DWORD m_tStats
DWORD m_tFailure
DWORD m_nFailures
DWORD m_tKeyTime
DWORD m_nKeyValue
DWORD m_nKeyHost

Protected Member Functions

void Serialize (CArchive &ar, int nVersion)
void Reset (IN_ADDR *pAddress)

Friends

class CHostCacheList
class CHostCacheLinks


Constructor & Destructor Documentation

CHostCacheHost::CHostCacheHost  ) 
 

Definition at line 807 of file HostCache.cpp.

References m_pNextHash, m_pNextTime, m_pPrevTime, and NULL.


Member Function Documentation

BOOL CHostCacheHost::CanConnect DWORD  tNow = 0  )  const
 

Definition at line 1012 of file HostCache.cpp.

References CSettings::sGnutella::ConnectThrottle, CSettings::Gnutella, m_pAddress, CNetwork::m_pHost, m_tConnect, Network, NULL, and Settings.

BOOL CHostCacheHost::CanQuery DWORD  tNow = 0  )  const
 

Definition at line 1033 of file HostCache.cpp.

References CSettings::eDonkey, CSettings::sGnutella2::EnableToday, CSettings::seDonkey::EnableToday, CSettings::Gnutella2, CSettings::sGnutella2::HostCurrent, m_nProtocol, m_tAck, m_tQuery, m_tRetryAfter, m_tSeen, NULL, PROTOCOL_ED2K, PROTOCOL_G2, CSettings::sGnutella2::QueryHostThrottle, CSettings::seDonkey::QueryServerThrottle, CSettings::seDonkey::ServerWalk, and Settings.

Referenced by CEDClients::RunGlobalStatsRequests().

BOOL CHostCacheHost::CanQuote DWORD  tNow = 0  )  const
 

Definition at line 1023 of file HostCache.cpp.

References CSettings::Gnutella2, CSettings::sGnutella2::HostCurrent, m_tSeen, NULL, and Settings.

Referenced by CShakeNeighbour::SendHostHeaders().

CNeighbour * CHostCacheHost::ConnectTo BOOL  bAutomatic = FALSE  ) 
 

Definition at line 971 of file HostCache.cpp.

References CNeighboursWithConnect::ConnectTo(), CNetwork::IsFirewalledAddress(), m_nPort, m_nProtocol, m_pAddress, m_tConnect, Neighbours, Network, and NULL.

void CHostCacheHost::Reset IN_ADDR *  pAddress  )  [protected]
 

Definition at line 921 of file HostCache.cpp.

References m_bPriority, m_nFailures, m_nFileLimit, m_nKeyHost, m_nKeyValue, m_nTCPFlags, m_nUDPFlags, m_nUserCount, m_nUserLimit, m_pAddress, m_pVendor, m_sDescription, m_sName, m_tAck, m_tAdded, m_tConnect, m_tFailure, m_tKeyTime, m_tQuery, m_tRetryAfter, m_tSeen, m_tStats, and NULL.

Referenced by CHostCacheList::AddInternal(), and CHostCacheList::Serialize().

void CHostCacheHost::Serialize CArchive &  ar,
int  nVersion
[protected]
 

Definition at line 815 of file HostCache.cpp.

References CVendorCache::Lookup(), m_bPriority, m_nFileLimit, m_nKeyHost, m_nKeyValue, m_nPort, m_nTCPFlags, m_nUDPFlags, m_nUserCount, m_nUserLimit, m_pAddress, m_pVendor, CVendor::m_sCode, m_sDescription, m_sName, m_tAdded, m_tKeyTime, m_tRetryAfter, m_tSeen, m_tStats, NULL, and VendorCache.

Referenced by CHostCacheList::Serialize().

void CHostCacheHost::SetKey DWORD  nKey,
IN_ADDR *  pHost = NULL
 

Definition at line 1084 of file HostCache.cpp.

References m_nFailures, m_nKeyHost, m_nKeyValue, CNetwork::m_pHost, m_tAck, m_tKeyTime, Network, and NULL.

Referenced by CG2Neighbour::OnKHL(), CG2Neighbour::OnQueryKeyAns(), and CDatagrams::OnQueryKeyAnswer().

CG1Packet * CHostCacheHost::ToG1Ping int  nTTL = 0,
GGUID pGUID = NULL
 

Definition at line 981 of file HostCache.cpp.

References G1_PACKET_PONG, m_nPort, m_pAddress, CG1Packet::New(), CPacket::WriteLongLE(), and CPacket::WriteShortLE().

CString CHostCacheHost::ToString  )  const
 

Definition at line 996 of file HostCache.cpp.

References m_nPort, and m_tSeen.

Referenced by CShakeNeighbour::SendHostHeaders().

void CHostCacheHost::Update WORD  nPort,
DWORD  tSeen = 0,
LPCTSTR  pszVendor = NULL
 

Definition at line 954 of file HostCache.cpp.

References CVendorCache::Lookup(), m_nPort, m_pVendor, CVendor::m_sCode, m_tSeen, NULL, and VendorCache.

Referenced by CHostCacheList::AddInternal().


Friends And Related Function Documentation

friend class CHostCacheLinks [friend]
 

Definition at line 148 of file HostCache.h.

friend class CHostCacheList [friend]
 

Definition at line 147 of file HostCache.h.


Member Data Documentation

BOOL CHostCacheHost::m_bPriority
 

Definition at line 106 of file HostCache.h.

Referenced by CHostCacheList::LoadDefaultED2KServers(), Reset(), and Serialize().

DWORD CHostCacheHost::m_nFailures
 

Definition at line 125 of file HostCache.h.

Referenced by CDatagrams::OnQueryAck(), CEDClients::OnServerStatus(), Reset(), CEDClients::RunGlobalStatsRequests(), and SetKey().

DWORD CHostCacheHost::m_nFileLimit
 

Definition at line 109 of file HostCache.h.

Referenced by CHostCacheList::ImportMET(), CEDClients::OnServerStatus(), Reset(), CEDNeighbour::SendSharedFiles(), and Serialize().

DWORD CHostCacheHost::m_nKeyHost
 

Definition at line 131 of file HostCache.h.

Referenced by CG2Neighbour::OnKHL(), CG2Neighbour::OnQueryKeyReq(), Reset(), Serialize(), and SetKey().

DWORD CHostCacheHost::m_nKeyValue
 

Definition at line 130 of file HostCache.h.

Referenced by CG2Neighbour::OnKHL(), CG2Neighbour::OnQueryKeyReq(), Reset(), Serialize(), and SetKey().

WORD CHostCacheHost::m_nPort
 

Definition at line 104 of file HostCache.h.

Referenced by ConnectTo(), CEDClients::RunGlobalStatsRequests(), Serialize(), ToG1Ping(), ToString(), and Update().

PROTOCOLID CHostCacheHost::m_nProtocol
 

Definition at line 102 of file HostCache.h.

Referenced by CanQuery(), CHostCacheList::Clear(), and ConnectTo().

DWORD CHostCacheHost::m_nTCPFlags
 

Definition at line 112 of file HostCache.h.

Referenced by CEDClients::OnServerStatus(), Reset(), and Serialize().

DWORD CHostCacheHost::m_nUDPFlags
 

Definition at line 113 of file HostCache.h.

Referenced by CHostCacheList::ImportMET(), CEDClients::OnServerStatus(), CEDClients::OnUDP(), Reset(), CEDClients::RunGlobalStatsRequests(), and Serialize().

DWORD CHostCacheHost::m_nUserCount
 

Definition at line 107 of file HostCache.h.

Referenced by CEDClients::OnServerStatus(), Reset(), and Serialize().

DWORD CHostCacheHost::m_nUserLimit
 

Definition at line 108 of file HostCache.h.

Referenced by CHostCacheList::ImportMET(), CEDClients::OnServerStatus(), Reset(), and Serialize().

IN_ADDR CHostCacheHost::m_pAddress
 

Definition at line 103 of file HostCache.h.

Referenced by CHostCacheList::AddInternal(), CanConnect(), ConnectTo(), CHostCacheList::Find(), CHostCacheList::Remove(), Reset(), CEDClients::RunGlobalStatsRequests(), Serialize(), CHostCacheList::Serialize(), and ToG1Ping().

CHostCacheHost* CHostCacheHost::m_pNextHash
 

Definition at line 96 of file HostCache.h.

Referenced by CHostCacheList::AddInternal(), CHostCacheHost(), CHostCacheList::Clear(), CHostCacheList::Find(), CHostCacheList::OnFailure(), CHostCacheList::Remove(), and CHostCacheList::Serialize().

CHostCacheHost* CHostCacheHost::m_pNextTime
 

Definition at line 98 of file HostCache.h.

Referenced by CHostCacheList::AddInternal(), CHostCacheList::Check(), CHostCacheHost(), CHostCacheList::Remove(), and CHostCacheList::Serialize().

CHostCacheHost* CHostCacheHost::m_pPrevTime
 

Definition at line 97 of file HostCache.h.

Referenced by CHostCacheList::AddInternal(), CHostCacheHost(), CHostCacheList::Remove(), CEDClients::RunGlobalStatsRequests(), CShakeNeighbour::SendHostHeaders(), and CHostCacheList::Serialize().

CVendor* CHostCacheHost::m_pVendor
 

Definition at line 105 of file HostCache.h.

Referenced by Reset(), Serialize(), and Update().

CString CHostCacheHost::m_sDescription
 

Definition at line 111 of file HostCache.h.

Referenced by CHostCacheList::ImportMET(), Reset(), and Serialize().

CString CHostCacheHost::m_sName
 

Definition at line 110 of file HostCache.h.

Referenced by CHostCacheList::ImportMET(), CEDClients::OnServerStatus(), Reset(), CEDClients::RunGlobalStatsRequests(), and Serialize().

DWORD CHostCacheHost::m_tAck
 

Definition at line 122 of file HostCache.h.

Referenced by CanQuery(), CDatagrams::OnQueryAck(), Reset(), and SetKey().

DWORD CHostCacheHost::m_tAdded
 

Definition at line 117 of file HostCache.h.

Referenced by Reset(), and Serialize().

DWORD CHostCacheHost::m_tConnect
 

Definition at line 120 of file HostCache.h.

Referenced by CanConnect(), ConnectTo(), and Reset().

DWORD CHostCacheHost::m_tFailure
 

Definition at line 124 of file HostCache.h.

Referenced by CHostCacheList::AddInternal(), CEDClients::OnServerStatus(), and Reset().

DWORD CHostCacheHost::m_tKeyTime
 

Definition at line 129 of file HostCache.h.

Referenced by Reset(), Serialize(), and SetKey().

DWORD CHostCacheHost::m_tQuery
 

Definition at line 121 of file HostCache.h.

Referenced by CanQuery(), and Reset().

DWORD CHostCacheHost::m_tRetryAfter
 

Definition at line 119 of file HostCache.h.

Referenced by CanQuery(), Reset(), and Serialize().

DWORD CHostCacheHost::m_tSeen
 

Definition at line 118 of file HostCache.h.

Referenced by CanQuery(), CanQuote(), CEDClients::OnServerStatus(), Reset(), Serialize(), ToString(), and Update().

DWORD CHostCacheHost::m_tStats
 

Definition at line 123 of file HostCache.h.

Referenced by CEDClients::OnServerStatus(), Reset(), CEDClients::RunGlobalStatsRequests(), and Serialize().


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