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

CEDClients Class Reference

#include <EDClients.h>

List of all members.

Public Member Functions

 CEDClients ()
virtual ~CEDClients ()
void Clear ()
BOOL PushTo (DWORD nClientID, WORD nClientPort)
CEDClientConnect (DWORD nClientID, WORD nClientPort, IN_ADDR *pServerAddress, WORD nServerPort, GGUID *pGUID=NULL)
CEDClientGetByIP (IN_ADDR *pAddress)
CEDClientGetByID (DWORD nClientID, IN_ADDR *pServer=NULL, GGUID *pGUID=NULL)
CEDClientGetByGUID (GGUID *pHash)
BOOL Merge (CEDClient *pClient)
BOOL IsFull (CEDClient *pCheckThis=NULL)
BOOL IsOverloaded ()
void OnRun ()
BOOL OnAccept (CConnection *pConnection)
BOOL OnUDP (SOCKADDR_IN *pHost, CEDPacket *pPacket)
CEDClientGetFirst () const

Protected Member Functions

void Add (CEDClient *pClient)
void Remove (CEDClient *pClient)

Protected Attributes

CEDClientm_pFirst
CEDClientm_pLast
int m_nCount
DWORD m_tLastRun
DWORD m_tLastMaxClients
DWORD m_tLastServerStats
in_addr m_pLastServer
DWORD m_nLastServerKey
BOOL m_bAllServersDone

Private Member Functions

void OnServerStatus (SOCKADDR_IN *pHost, CEDPacket *pPacket)
void RequestServerStatus (IN_ADDR *pHost, WORD nPort)
void RunGlobalStatsRequests (DWORD tNow)

Friends

class CEDClient


Constructor & Destructor Documentation

CEDClients::CEDClients  ) 
 

Definition at line 52 of file EDClients.cpp.

References m_bAllServersDone, m_nCount, m_nLastServerKey, m_pFirst, m_pLast, m_tLastMaxClients, m_tLastRun, m_tLastServerStats, and NULL.

CEDClients::~CEDClients  )  [virtual]
 

Definition at line 64 of file EDClients.cpp.

References Clear().


Member Function Documentation

void CEDClients::Add CEDClient pClient  )  [protected]
 

Definition at line 72 of file EDClients.cpp.

References m_nCount, CEDClient::m_pEdNext, CEDClient::m_pEdPrev, m_pFirst, m_pLast, and NULL.

Referenced by CEDClient::CEDClient().

void CEDClients::Clear  ) 
 

Definition at line 113 of file EDClients.cpp.

References m_nCount, m_pFirst, m_pLast, and NULL.

Referenced by CShareazaApp::ExitInstance(), and ~CEDClients().

CEDClient * CEDClients::Connect DWORD  nClientID,
WORD  nClientPort,
IN_ADDR *  pServerAddress,
WORD  nServerPort,
GGUID pGUID = NULL
 

Definition at line 140 of file EDClients.cpp.

References CEDClient, CEDClient::ConnectTo(), GetByGUID(), GetByID(), CSecurity::IsDenied(), IsFull(), CEDPacket::IsLowID(), NULL, and Security.

Referenced by CDownloadTransferED2K::Initiate(), CChatWindows::OpenPrivate(), CDownloadSource::PushRequest(), and PushTo().

CEDClient * CEDClients::GetByGUID GGUID pHash  ) 
 

Definition at line 200 of file EDClients.cpp.

References CEDClient::m_pEdNext, m_pFirst, and NULL.

Referenced by Connect().

CEDClient * CEDClients::GetByID DWORD  nClientID,
IN_ADDR *  pServer = NULL,
GGUID pGUID = NULL
 

Definition at line 185 of file EDClients.cpp.

References CEDClient::m_pEdNext, m_pFirst, and NULL.

Referenced by Connect().

CEDClient * CEDClients::GetByIP IN_ADDR *  pAddress  ) 
 

Definition at line 174 of file EDClients.cpp.

References CEDClient::m_pEdNext, m_pFirst, and NULL.

Referenced by OnAccept(), OnUDP(), and CChatSession::SendChatMessage().

CEDClient* CEDClients::GetFirst  )  const [inline]
 

Definition at line 76 of file EDClients.h.

References m_pFirst.

Referenced by CDownloadTransferED2K::~CDownloadTransferED2K().

BOOL CEDClients::IsFull CEDClient pCheckThis = NULL  ) 
 

Definition at line 233 of file EDClients.cpp.

References CSettings::eDonkey, CEDClient::m_pEdNext, m_pFirst, m_tLastMaxClients, CSettings::seDonkey::MaxLinks, NULL, and Settings.

Referenced by Connect(), CEDClient::Connect(), CDownloadTransferED2K::Initiate(), OnAccept(), and CDownloadSource::PushRequest().

BOOL CEDClients::IsOverloaded  ) 
 

Definition at line 279 of file EDClients.cpp.

References CSettings::eDonkey, CEDClient::m_pEdNext, m_pFirst, CSettings::seDonkey::MaxLinks, and Settings.

Referenced by CEDClient::Connect(), and OnAccept().

BOOL CEDClients::Merge CEDClient pClient  ) 
 

Definition at line 213 of file EDClients.cpp.

References CEDClient::m_pEdNext, m_pFirst, and NULL.

Referenced by CEDClient::OnLoggedIn().

BOOL CEDClients::OnAccept CConnection pConnection  ) 
 

Definition at line 320 of file EDClients.cpp.

References CEDClient::AttachTo(), CEDClient, CSettings::Connection, CSettings::eDonkey, CSettings::seDonkey::EnableToday, GetByIP(), IDS_ED2K_CLIENT_DISABLED, IsFull(), IsOverloaded(), CTransfers::m_pSection, CShareazaApp::Message(), MSG_DEBUG, MSG_ERROR, NULL, CSettings::sConnection::RequireForTransfers, Settings, theApp, and Transfers.

Referenced by CHandshake::OnRead().

void CEDClients::OnRun  ) 
 

Definition at line 295 of file EDClients.cpp.

References CSettings::eDonkey, CSettings::seDonkey::EnableToday, m_pFirst, m_tLastRun, CSettings::seDonkey::PacketThrottle, RunGlobalStatsRequests(), CSettings::seDonkey::ServerWalk, and Settings.

Referenced by CTransfers::OnRun().

void CEDClients::OnServerStatus SOCKADDR_IN *  pHost,
CEDPacket pPacket
[private]
 

Definition at line 441 of file EDClients.cpp.

References ED2K_SERVER_TCP_GETSOURCES2, ED2K_SERVER_TCP_UNICODE, ED2K_SERVER_UDP_GETSOURCES2, ED2K_SERVER_UDP_UNICODE, CHostCache::eDonkey, CHostCacheList::Find(), CPacket::GetRemaining(), HostCache, CHostCacheHost::m_nFailures, CHostCacheHost::m_nFileLimit, m_nLastServerKey, CHostCacheHost::m_nTCPFlags, CHostCacheHost::m_nUDPFlags, CHostCacheHost::m_nUserCount, CHostCacheHost::m_nUserLimit, m_pLastServer, CHostCacheHost::m_sName, CHostCacheHost::m_tFailure, CHostCacheHost::m_tSeen, CHostCacheHost::m_tStats, CShareazaApp::Message(), MSG_DEFAULT, MSG_ERROR, NULL, CPacket::ReadLongLE(), and theApp.

Referenced by OnUDP().

BOOL CEDClients::OnUDP SOCKADDR_IN *  pHost,
CEDPacket pPacket
 

Definition at line 361 of file EDClients.cpp.

References Datagrams, CSettings::seDonkey::DefaultServerFlags, Downloads, ED2K_C2C_UDP_FILENOTFOUND, ED2K_C2C_UDP_QUEUEFULL, ED2K_C2C_UDP_REASKACK, ED2K_C2C_UDP_REASKFILEPING, ED2K_PROTOCOL_EMULE, ED2K_S2CG_FOUNDSOURCES, ED2K_S2CG_SEARCHRESULT, ED2K_S2CG_SERVERSTATUS, CHostCache::eDonkey, CSettings::eDonkey, CHostCacheList::Find(), CQueryHit::FromPacket(), GetByIP(), HostCache, CEDPacket::m_nType, CHostCacheHost::m_nUDPFlags, CTransfers::m_pSection, Network, CEDPacket::New(), CNetwork::OnQueryHits(), CDownloads::OnQueryHits(), OnServerStatus(), CDatagrams::Send(), Settings, and Transfers.

Referenced by CDatagrams::OnDatagram().

BOOL CEDClients::PushTo DWORD  nClientID,
WORD  nClientPort
 

Definition at line 130 of file EDClients.cpp.

References CEDClient::Connect(), Connect(), and NULL.

Referenced by CEDNeighbour::OnCallbackRequest().

void CEDClients::Remove CEDClient pClient  )  [protected]
 

Definition at line 93 of file EDClients.cpp.

References m_nCount, CEDClient::m_pEdNext, CEDClient::m_pEdPrev, m_pFirst, m_pLast, and NULL.

Referenced by CEDClient::~CEDClient().

void CEDClients::RequestServerStatus IN_ADDR *  pHost,
WORD  nPort
[private]
 

Definition at line 520 of file EDClients.cpp.

References Datagrams, ED2K_C2SG_SERVERSTATUSREQUEST, ED2K_PROTOCOL_EDONKEY, m_nLastServerKey, CEDPacket::New(), CDatagrams::Send(), and CPacket::WriteLongLE().

Referenced by RunGlobalStatsRequests().

void CEDClients::RunGlobalStatsRequests DWORD  tNow  )  [private]
 

Definition at line 533 of file EDClients.cpp.

References CHostCacheHost::CanQuery(), CSettings::Connection, Datagrams, CSettings::eDonkey, CHostCache::eDonkey, CHostCacheList::Find(), CNeighboursBase::Get(), CHostCacheList::GetNewest(), HostCache, CDatagrams::IsStable(), m_bAllServersDone, CHostCacheHost::m_nFailures, m_nLastServerKey, CHostCacheHost::m_nPort, CHostCacheHost::m_nUDPFlags, CHostCacheHost::m_pAddress, m_pLastServer, CHostCacheHost::m_pPrevTime, CNetwork::m_pSection, CHostCacheHost::m_sName, m_tLastServerStats, CHostCacheHost::m_tStats, CShareazaApp::Message(), MSG_DEBUG, MSG_DEFAULT, Neighbours, Network, NULL, CHostCacheList::Remove(), RequestServerStatus(), Settings, CSettings::seDonkey::StatsGlobalThrottle, CSettings::seDonkey::StatsServerThrottle, theApp, and CSettings::sConnection::TimeoutHandshake.

Referenced by OnRun().


Friends And Related Function Documentation

friend class CEDClient [friend]
 

Definition at line 81 of file EDClients.h.

Referenced by Connect(), and OnAccept().


Member Data Documentation

BOOL CEDClients::m_bAllServersDone [protected]
 

Definition at line 49 of file EDClients.h.

Referenced by CEDClients(), and RunGlobalStatsRequests().

int CEDClients::m_nCount [protected]
 

Definition at line 43 of file EDClients.h.

Referenced by Add(), CEDClients(), Clear(), and Remove().

DWORD CEDClients::m_nLastServerKey [protected]
 

Definition at line 48 of file EDClients.h.

Referenced by CEDClients(), OnServerStatus(), RequestServerStatus(), and RunGlobalStatsRequests().

CEDClient* CEDClients::m_pFirst [protected]
 

Definition at line 41 of file EDClients.h.

Referenced by Add(), CEDClients(), Clear(), GetByGUID(), GetByID(), GetByIP(), GetFirst(), IsFull(), IsOverloaded(), Merge(), OnRun(), and Remove().

CEDClient* CEDClients::m_pLast [protected]
 

Definition at line 42 of file EDClients.h.

Referenced by Add(), CEDClients(), Clear(), and Remove().

in_addr CEDClients::m_pLastServer [protected]
 

Definition at line 47 of file EDClients.h.

Referenced by OnServerStatus(), and RunGlobalStatsRequests().

DWORD CEDClients::m_tLastMaxClients [protected]
 

Definition at line 45 of file EDClients.h.

Referenced by CEDClients(), and IsFull().

DWORD CEDClients::m_tLastRun [protected]
 

Definition at line 44 of file EDClients.h.

Referenced by CEDClients(), and OnRun().

DWORD CEDClients::m_tLastServerStats [protected]
 

Definition at line 46 of file EDClients.h.

Referenced by CEDClients(), and RunGlobalStatsRequests().


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