#include <Network.h>
Public Member Functions | |
CNetwork () | |
virtual | ~CNetwork () |
BOOL | IsAvailable () const |
BOOL | IsConnected () const |
BOOL | IsListening () const |
int | IsWellConnected () const |
BOOL | IsStable () const |
DWORD | GetStableTime () const |
BOOL | IsConnectedTo (IN_ADDR *pAddress) |
BOOL | ReadyToTransfer (DWORD tNow) const |
BOOL | Connect (BOOL bAutoConnect=FALSE) |
void | Disconnect () |
BOOL | ConnectTo (LPCTSTR pszAddress, int nPort=0, PROTOCOLID nProtocol=PROTOCOL_NULL, BOOL bNoUltraPeer=FALSE) |
void | AcquireLocalAddress (LPCTSTR pszHeader) |
BOOL | Resolve (LPCTSTR pszHost, int nPort, SOCKADDR_IN *pHost, BOOL bNames=TRUE) const |
BOOL | AsyncResolve (LPCTSTR pszAddress, WORD nPort, PROTOCOLID nProtocol, BYTE nCommand) |
WORD | RandomPort () const |
void | CreateID (GGUID &oID) |
BOOL | IsFirewalledAddress (LPVOID pAddress, BOOL bIncludeSelf=FALSE) |
BOOL | GetNodeRoute (GGUID *pGUID, CNeighbour **ppNeighbour, SOCKADDR_IN *pEndpoint) |
BOOL | RoutePacket (CG2Packet *pPacket) |
BOOL | SendPush (GGUID *pGUID, DWORD nIndex=0) |
BOOL | RouteHits (CQueryHit *pHits, CPacket *pPacket) |
void | OnWinsock (WPARAM wParam, LPARAM lParam) |
void | OnQuerySearch (CQuerySearch *pSearch) |
void | OnQueryHits (CQueryHit *pHits) |
Public Attributes | |
CRouteCache * | NodeRoute |
CRouteCache * | QueryRoute |
CQueryKeys * | QueryKeys |
CMutex | m_pSection |
CEvent | m_pWakeup |
SOCKADDR_IN | m_pHost |
BOOL | m_bEnabled |
BOOL | m_bAutoConnect |
DWORD | m_tStartedConnecting |
DWORD | m_tLastConnect |
Protected Member Functions | |
void | OnRun () |
Static Protected Member Functions | |
static UINT | ThreadStart (LPVOID pParam) |
Protected Attributes | |
HANDLE | m_hThread |
DWORD | m_nSequence |
CMapPtrToPtr | m_pLookups |
Friends | |
class | CHandshakes |
class | CNeighbours |
|
Definition at line 68 of file Network.cpp. References m_bAutoConnect, m_bEnabled, m_hThread, m_nSequence, m_tLastConnect, m_tStartedConnecting, NodeRoute, NULL, QueryKeys, and QueryRoute. |
|
Definition at line 82 of file Network.cpp. References NodeRoute, QueryKeys, and QueryRoute. |
|
Definition at line 326 of file Network.cpp. References IsFirewalledAddress(), and m_pHost. Referenced by CShakeNeighbour::OnHeaderLine(), and CConnection::OnHeaderLine(). |
|
Definition at line 427 of file Network.cpp. References m_pLookups, m_pSection, NULL, and WM_WINSOCK. Referenced by ConnectTo(), and CDiscoveryService::ResolveGnutella(). |
|
|
Definition at line 307 of file Network.cpp. References AsyncResolve(), Connect(), GNUTELLA_DEFAULT_PORT, IDS_NETWORK_RESOLVE_FAIL, IDS_NETWORK_RESOLVING, m_bEnabled, m_pSection, CShareazaApp::Message(), MSG_DEFAULT, MSG_ERROR, and theApp. Referenced by CMainWnd::OnNetworkConnectTo(), CURLActionDlg::OnUrlDownload(), and CURLActionDlg::OnUrlSearch(). |
|
Definition at line 349 of file Network.cpp. References CGProfile::GUID, m_nSequence, and MyProfile. Referenced by CQuerySearch::CQuerySearch(), CLocalSearch::Execute(), CG1Packet::New(), CNeighboursWithG1::OnG1Ping(), CSearchWnd::OnSearchSearch(), CUploadTransferHTTP::RequestTigerTreeDIME(), and CG2Neighbour::SendHAW(). |
|
|
Definition at line 533 of file Network.cpp. References CNeighboursBase::GetIterator(), CNeighboursBase::GetNext(), CGProfile::GUID, CRouteCache::Lookup(), CNeighbour::m_bGUID, CNeighbour::m_pGUID, MyProfile, Neighbours, NodeRoute, and NULL. Referenced by RoutePacket(), and SendPush(). |
|
Definition at line 126 of file Network.cpp. References Handshakes, IsStable(), CHandshakes::m_tStableTime, and NULL. Referenced by CNeighboursWithConnect::IsG1UltrapeerCapable(), CNeighboursWithConnect::IsG2HubCapable(), CDownloadWithTransfers::StartNewTransfer(), and CDiscoveryServices::Update(). |
|
Definition at line 92 of file Network.cpp. Referenced by CMainWnd::LocalSystemChecks(). |
|
|
Definition at line 132 of file Network.cpp. References CNeighboursBase::Get(), Handshakes, CTransfers::IsConnectedTo(), CHandshakes::IsConnectedTo(), m_pHost, Neighbours, NULL, and Transfers. Referenced by CDatagrams::OnPong(). |
|
|
|
Definition at line 121 of file Network.cpp. References Handshakes, IsListening(), and CHandshakes::m_nStableCount. Referenced by CLocalSearch::CreatePacketG2(), CMatchCtrl::DrawItem(), GetStableTime(), and CDownloadTransferHTTP::SendRequest(). |
|
|
Definition at line 756 of file Network.cpp. References Downloads, CWindowManager::Find(), CShareazaApp::m_pSection, NULL, CChildWnd::OnQueryHits(), CDownloads::OnQueryHits(), CShareazaApp::SafeMainWnd(), and theApp. Referenced by CNeighbour::OnCommonHit(), CEDNeighbour::OnFoundSources(), CDatagrams::OnHit(), CEDNeighbour::OnSearchResults(), and CEDClients::OnUDP(). |
|
Definition at line 734 of file Network.cpp. References CWindowManager::Find(), CShareazaApp::m_pSection, NULL, CChildWnd::OnQuerySearch(), CShareazaApp::SafeMainWnd(), and theApp. Referenced by CG2Neighbour::OnQuery(), CG1Neighbour::OnQuery(), and CDatagrams::OnQuery(). |
|
Definition at line 471 of file Network.cpp. References CQueryHashMaster::Build(), CrawlSession, Datagrams, CCrawlSession::m_bActive, m_bEnabled, m_pSection, m_pWakeup, Neighbours, CNeighbours::OnRun(), CCrawlSession::OnRun(), CSearchManager::OnRun(), CDatagrams::OnRun(), QueryHashMaster, and SearchManager. Referenced by ThreadStart(). |
|
Definition at line 496 of file Network.cpp. References CNeighboursWithConnect::ConnectTo(), CHostCache::ForProtocol(), HostCache, IDS_NETWORK_RESOLVE_FAIL, m_pLookups, m_pSection, CShareazaApp::Message(), MSG_ERROR, Neighbours, NULL, and theApp. Referenced by CMainWnd::OnWinsock(). |
|
Definition at line 456 of file Network.cpp. Referenced by CHandshakes::Listen(), and CWizardConnectionPage::OnWizardNext(). |
|
Definition at line 142 of file Network.cpp. References CSettings::Connection, m_tStartedConnecting, CSettings::sConnection::RequireForTransfers, Settings, and CSettings::sConnection::SlowConnect. Referenced by CDownloadWithTransfers::CanStartTransfers(), and CNeighboursWithConnect::Maintain(). |
|
Definition at line 382 of file Network.cpp. References NULL. Referenced by Connect(), CConnection::ConnectTo(), CDatagrams::Listen(), CMainWnd::OnNetworkBrowseTo(), CDownloadTransferBT::OnSourceResponse(), CURLActionDlg::OnUrlDownload(), CURLActionDlg::OnUrlSearch(), CSourceURL::ParseBTC(), CSourceURL::ParseED2KFTP(), CSourceURL::ParseFTP(), CSourceURL::ParseHTTP(), and CBTTrackerRequest::Process(). |
|
|
Definition at line 557 of file Network.cpp. References CStatistics::Current, Datagrams, G2_PACKET_PUSH, GetNodeRoute(), CGProfile::GUID, CNeighbour::m_nProtocol, MyProfile, NULL, PROTOCOL_G1, CDatagrams::Send(), CNeighbour::Send(), CG1Neighbour::SendG2Push(), and Statistics. Referenced by CG2Neighbour::OnPacket(), and CDatagrams::OnPacket(). |
|
|
Definition at line 464 of file Network.cpp. References OnRun(). Referenced by Connect(). |
|
|
|
|
|
Definition at line 54 of file Network.h. Referenced by CNetwork(), Connect(), Disconnect(), CNeighboursWithConnect::Maintain(), and CNeighboursWithConnect::OnRun(). |
|
Definition at line 53 of file Network.h. Referenced by CNetwork(), Connect(), ConnectTo(), Disconnect(), IsConnected(), CNeighboursWithConnect::IsG1Leaf(), CNeighboursWithConnect::IsG1Ultrapeer(), CNeighboursWithConnect::IsG2Hub(), CNeighboursWithConnect::IsG2Leaf(), IsListening(), CNeighboursWithConnect::Maintain(), OnRun(), and CNeighboursWithConnect::OnRun(). |
|
Definition at line 58 of file Network.h. Referenced by CNetwork(), Connect(), and Disconnect(). |
|
Definition at line 59 of file Network.h. Referenced by CNetwork(), and CreateID(). |
|
|
Definition at line 60 of file Network.h. Referenced by AsyncResolve(), Disconnect(), and OnWinsock(). |
|
|
Definition at line 51 of file Network.h. Referenced by CShakeNeighbour::AttachTo(), CShakeNeighbour::ConnectTo(), CEDNeighbour::ConnectTo(), Disconnect(), CDatagrams::Listen(), and OnRun(). |
|
Definition at line 56 of file Network.h. Referenced by CNetwork(), and CNeighboursWithConnect::Maintain(). |
|
Definition at line 55 of file Network.h. Referenced by CNetwork(), Connect(), Disconnect(), and ReadyToTransfer(). |
|
Definition at line 46 of file Network.h. Referenced by CNetwork(), Connect(), Disconnect(), CQueryHit::FromPacket(), GetNodeRoute(), CNeighbour::OnCommonHit(), CDatagrams::OnHit(), CG1Neighbour::OnPush(), CNeighboursBase::Remove(), and ~CNetwork(). |
|
Definition at line 48 of file Network.h. Referenced by CNetwork(), CDatagrams::OnQuery(), CDatagrams::OnQueryKeyRequest(), and ~CNetwork(). |
|
Definition at line 47 of file Network.h. Referenced by CNetwork(), Connect(), Disconnect(), CG2Neighbour::OnQuery(), CG1Neighbour::OnQuery(), CDatagrams::OnQuery(), CDatagrams::OnQueryAck(), CNeighboursBase::Remove(), RouteHits(), and ~CNetwork(). |