#include <ShakeNeighbour.h>
Inheritance diagram for CShakeNeighbour:
Public Member Functions | |
CShakeNeighbour () | |
virtual | ~CShakeNeighbour () |
virtual BOOL | ConnectTo (IN_ADDR *pAddress, WORD nPost, BOOL bAutomatic=FALSE, BOOL bNoUltraPeer=FALSE) |
virtual void | AttachTo (CConnection *pConnection) |
virtual void | Close (UINT nError=IDS_CONNECTION_CLOSED) |
Protected Member Functions | |
virtual BOOL | OnConnected () |
virtual BOOL | OnRead () |
virtual void | OnDropped (BOOL bError) |
virtual BOOL | OnRun () |
virtual BOOL | OnHeaderLine (CString &strHeader, CString &strValue) |
virtual BOOL | OnHeadersComplete () |
virtual BOOL | OnHeadersCompleteG1 () |
virtual BOOL | OnHeadersCompleteG2 () |
void | SendMinimalHeaders () |
void | SendPublicHeaders () |
void | SendPrivateHeaders () |
void | SendHostHeaders (LPCTSTR pszMessage=NULL) |
BOOL | ReadResponse () |
void | OnHandshakeComplete () |
BOOL | IsClientObsolete () |
BOOL | IsClientBad () |
BOOL | IsClientBanned () |
Protected Attributes | |
BOOL | m_bCanDeflate |
BOOL | m_bSentAddress |
BOOL | m_bG2Send |
BOOL | m_bG2Accept |
BOOL | m_bDeflateSend |
BOOL | m_bDeflateAccept |
TRISTATE | m_bUltraPeerSet |
TRISTATE | m_bUltraPeerNeeded |
TRISTATE | m_bUltraPeerLoaded |
|
Definition at line 51 of file ShakeNeighbour.cpp. References CSettings::sGnutella::DeflateHub2Hub, CSettings::sGnutella::DeflateLeaf2Hub, CSettings::Gnutella, CNeighboursWithConnect::IsG2Leaf(), m_bCanDeflate, m_bDeflateAccept, m_bDeflateSend, m_bG2Accept, m_bG2Send, m_bSentAddress, m_bUltraPeerLoaded, m_bUltraPeerNeeded, m_bUltraPeerSet, Neighbours, Settings, and TS_UNKNOWN. |
|
Definition at line 71 of file ShakeNeighbour.cpp. |
|
Reimplemented from CConnection. Definition at line 122 of file ShakeNeighbour.cpp. References CNeighboursBase::Add(), CConnection::AttachTo(), CConnection::m_hSocket, CNeighbour::m_nState, CNetwork::m_pWakeup, Neighbours, Network, and nrsHandshake1. Referenced by CNeighboursWithConnect::OnAccept(). |
|
Reimplemented from CNeighbour. Definition at line 146 of file ShakeNeighbour.cpp. References CConnection::Close(), HostCache, CConnection::m_bInitiated, CNeighbour::m_nState, CConnection::m_pHost, nrsHandshake2, and CHostCache::OnFailure(). |
|
Definition at line 83 of file ShakeNeighbour.cpp. References CNeighboursBase::Add(), CConnection::ConnectTo(), IDS_CONNECTION_ATTEMPTING, IDS_CONNECTION_CONNECT_FAIL, CNeighbour::m_bAutomatic, m_bUltraPeerSet, CConnection::m_hSocket, CNeighbour::m_nState, CConnection::m_pHost, CNetwork::m_pWakeup, CConnection::m_sAddress, CShareazaApp::Message(), MSG_DEFAULT, MSG_ERROR, Neighbours, Network, nrsConnecting, theApp, TS_FALSE, and TS_UNKNOWN. Referenced by CNeighboursWithConnect::ConnectTo(). |
|
Definition at line 1507 of file ShakeNeighbour.cpp. References _tcsistr(), and CConnection::m_sUserAgent. Referenced by OnHeaderLine(). |
|
Definition at line 1546 of file ShakeNeighbour.cpp. References CConnection::m_sUserAgent. Referenced by OnHeaderLine(). |
|
Definition at line 1455 of file ShakeNeighbour.cpp. References _tcsistr(), and CConnection::m_sUserAgent. Referenced by OnHeaderLine(). |
|
Reimplemented from CConnection. Definition at line 169 of file ShakeNeighbour.cpp. References IDS_CONNECTION_CONNECTED, CNeighbour::m_nState, CConnection::m_pOutput, CConnection::m_sAddress, CShareazaApp::Message(), MSG_DEFAULT, nrsHandshake1, CConnection::OnConnected(), CNeighbour::OnWrite(), CBuffer::Print(), SendHostHeaders(), SendPublicHeaders(), and theApp. |
|
Reimplemented from CNeighbour. Definition at line 198 of file ShakeNeighbour.cpp. References CConnection::Close(), IDS_CONNECTION_DROPPED, IDS_CONNECTION_REFUSED, CNeighbour::m_nState, and nrsConnecting. |
|
|
|
Reimplemented from CConnection. Definition at line 821 of file ShakeNeighbour.cpp. References m_bG2Accept, m_bG2Send, CConnection::m_bInitiated, CNeighbour::m_nProtocol, OnHeadersCompleteG1(), OnHeadersCompleteG2(), PROTOCOL_G1, and PROTOCOL_G2. |
|
|
|
Reimplemented from CNeighbour. Definition at line 219 of file ShakeNeighbour.cpp. References CNeighbour::m_nState, nrsHandshake1, nrsHandshake2, nrsHandshake3, nrsRejected, CConnection::OnRead(), CConnection::ReadHeaders(), and ReadResponse(). |
|
Reimplemented from CNeighbour. Definition at line 249 of file ShakeNeighbour.cpp. References CConnection::Close(), CSettings::Connection, DiscoveryServices, IDS_CONNECTION_TIMEOUT_CONNECT, IDS_HANDSHAKE_TIMEOUT, CNeighbour::m_nState, CConnection::m_pHost, CConnection::m_tConnected, nrsClosing, nrsConnecting, nrsHandshake1, nrsHandshake2, nrsHandshake3, nrsRejected, CDiscoveryServices::OnGnutellaFailed(), Settings, CSettings::sConnection::TimeoutConnect, and CSettings::sConnection::TimeoutHandshake. |
|
Definition at line 536 of file ShakeNeighbour.cpp. References CConnection::Close(), CNeighbour::DelayClose(), IDS_HANDSHAKE_FAIL, IDS_HANDSHAKE_REJECTED, IDS_HANDSHAKE_SURPLUS, CConnection::m_bInitiated, CNeighbour::m_nState, CConnection::m_pInput, CConnection::m_sAddress, CShareazaApp::Message(), MSG_DEBUG, MSG_ERROR, nrsHandshake2, nrsHandshake3, nrsRejected, OnHandshakeComplete(), CBuffer::ReadLine(), and theApp. Referenced by OnRead(). |
|
Definition at line 467 of file ShakeNeighbour.cpp. References CHostCacheHost::CanQuote(), CHostCacheList::GetNewest(), CHostCache::Gnutella1, CSettings::Gnutella1, CHostCache::Gnutella2, HostCache, m_bG2Accept, m_bG2Send, CNeighbour::m_bShareaza, CConnection::m_pOutput, CHostCacheHost::m_pPrevTime, NULL, CSettings::sGnutella1::PongCount, CBuffer::Print(), SendMinimalHeaders(), Settings, and CHostCacheHost::ToString(). Referenced by OnConnected(), OnHeadersCompleteG1(), and OnHeadersCompleteG2(). |
|
Definition at line 303 of file ShakeNeighbour.cpp. References CSettings::sGnutella2::EnableToday, CSettings::Gnutella2, m_bG2Accept, CConnection::m_bInitiated, CNeighbour::m_nProtocol, CConnection::m_pOutput, CBuffer::Print(), PROTOCOL_G1, Settings, and CSettings::SmartAgent(). Referenced by OnHeadersCompleteG1(), OnHeadersCompleteG2(), and SendHostHeaders(). |
|
Definition at line 433 of file ShakeNeighbour.cpp. References m_bDeflateAccept, m_bDeflateSend, m_bG2Accept, m_bG2Send, CConnection::m_bInitiated, m_bSentAddress, CNeighbour::m_nProtocol, CConnection::m_pOutput, CBuffer::Print(), PROTOCOL_G1, and CConnection::SendMyAddress(). Referenced by OnHeadersCompleteG1(), and OnHeadersCompleteG2(). |
|
|
Definition at line 48 of file ShakeNeighbour.h. Referenced by CShakeNeighbour(), OnHeaderLine(), and SendPublicHeaders(). |
|
Definition at line 75 of file ShakeNeighbour.h. Referenced by CShakeNeighbour(), OnHandshakeComplete(), OnHeaderLine(), SendPrivateHeaders(), and SendPublicHeaders(). |
|
Definition at line 70 of file ShakeNeighbour.h. Referenced by CShakeNeighbour(), OnHandshakeComplete(), OnHeaderLine(), and SendPrivateHeaders(). |
|
Definition at line 64 of file ShakeNeighbour.h. Referenced by CShakeNeighbour(), OnHandshakeComplete(), OnHeaderLine(), OnHeadersComplete(), SendHostHeaders(), SendMinimalHeaders(), and SendPrivateHeaders(). |
|
Definition at line 58 of file ShakeNeighbour.h. Referenced by CShakeNeighbour(), OnHandshakeComplete(), OnHeaderLine(), OnHeadersComplete(), SendHostHeaders(), and SendPrivateHeaders(). |
|
Definition at line 51 of file ShakeNeighbour.h. Referenced by CShakeNeighbour(), SendPrivateHeaders(), and SendPublicHeaders(). |
|
Definition at line 106 of file ShakeNeighbour.h. Referenced by CShakeNeighbour(), and OnHeaderLine(). |
|
Definition at line 92 of file ShakeNeighbour.h. Referenced by CShakeNeighbour(), OnHeaderLine(), OnHeadersCompleteG1(), and OnHeadersCompleteG2(). |
|
Definition at line 80 of file ShakeNeighbour.h. Referenced by ConnectTo(), CShakeNeighbour(), OnHeaderLine(), OnHeadersCompleteG1(), OnHeadersCompleteG2(), and SendPublicHeaders(). |