#include <Connection.h>
Inheritance diagram for CConnection:
Public Member Functions | |
CConnection () | |
virtual | ~CConnection () |
virtual BOOL | ConnectTo (SOCKADDR_IN *pHost) |
virtual BOOL | ConnectTo (IN_ADDR *pAddress, WORD nPort) |
virtual void | AcceptFrom (SOCKET hSocket, SOCKADDR_IN *pHost) |
virtual void | AttachTo (CConnection *pConnection) |
virtual void | Close () |
BOOL | DoRun () |
void | QueueRun () |
void | Measure () |
BOOL | ReadHeaders () |
BOOL | SendMyAddress () |
BOOL | IsAgentBlocked () |
Static Public Member Functions | |
static CString | URLEncode (LPCTSTR pszInput) |
static CString | URLDecode (LPCTSTR pszInput) |
static CString | URLDecodeANSI (LPCTSTR pszInput) |
static CString | URLDecodeUnicode (LPCTSTR pszInput) |
static BOOL | StartsWith (LPCTSTR pszInput, LPCTSTR pszText) |
Public Attributes | |
SOCKADDR_IN | m_pHost |
CString | m_sAddress |
BOOL | m_bInitiated |
BOOL | m_bConnected |
DWORD | m_tConnected |
SOCKET | m_hSocket |
CBuffer * | m_pInput |
CBuffer * | m_pOutput |
CString | m_sUserAgent |
CString | m_sLastHeader |
TCPBandwidthMeter | m_mInput |
TCPBandwidthMeter | m_mOutput |
int | m_nQueuedRun |
Protected Member Functions | |
virtual BOOL | OnRun () |
virtual BOOL | OnConnected () |
virtual BOOL | OnRead () |
virtual BOOL | OnWrite () |
virtual void | OnDropped (BOOL bError) |
virtual BOOL | OnHeaderLine (CString &strHeader, CString &strValue) |
virtual BOOL | OnHeadersComplete () |
|
Definition at line 59 of file Connection.cpp. References m_bConnected, m_bInitiated, m_hSocket, m_mInput, m_mOutput, m_nQueuedRun, m_pInput, m_pOutput, m_tConnected, and NULL. |
|
Definition at line 76 of file Connection.cpp. References Close(). |
|
Definition at line 199 of file Connection.cpp. References CSettings::Bandwidth, CStatistics::Current, m_bConnected, m_bInitiated, m_hSocket, m_pHost, m_pInput, m_pOutput, m_sAddress, m_tConnected, CSettings::sBandwidth::PeerIn, CSettings::sBandwidth::PeerOut, Settings, and Statistics. Referenced by CHandshake::CHandshake(). |
|
Reimplemented in CBTClient, CChatSession, CEDClient, CShakeNeighbour, CTransfer, and CUploadTransferHTTP. Definition at line 231 of file Connection.cpp. References m_bConnected, m_bInitiated, m_hSocket, m_mInput, m_mOutput, m_pHost, m_pInput, m_pOutput, m_sAddress, m_sUserAgent, m_tConnected, NULL, and TCPBandwidthMeter::tLast. Referenced by CTransfer::AttachTo(), CShakeNeighbour::AttachTo(), CChatSession::AttachTo(), CHandshake::CHandshake(), CNeighbour::CNeighbour(), and CChatSession::OnPush(). |
|
|
Reimplemented in CTransfer. Definition at line 97 of file Connection.cpp. References CSettings::Bandwidth, CSettings::Connection, CStatistics::Current, IDS_NETWORK_SECURITY_OUTGOING, CSecurity::IsDenied(), m_bInitiated, m_hSocket, m_pHost, m_pInput, m_pOutput, m_sAddress, m_tConnected, CShareazaApp::Message(), MSG_DEBUG, MSG_ERROR, Network, NULL, CSettings::sConnection::OutHost, CSettings::sBandwidth::PeerIn, CSettings::sBandwidth::PeerOut, CNetwork::Resolve(), Security, Settings, Statistics, and theApp. |
|
Reimplemented in CDownloadTransferFTP::CFTPLIST, and CDownloadTransferFTP::CFTPRETR. Definition at line 88 of file Connection.cpp. Referenced by CEDClient::Connect(), CChatSession::Connect(), CTransfer::ConnectTo(), CShakeNeighbour::ConnectTo(), CEDNeighbour::ConnectTo(), CDownloadTransferFTP::CFTPRETR::ConnectTo(), CDownloadTransferFTP::CFTPLIST::ConnectTo(), and CHandshake::Push(). |
|
Definition at line 297 of file Connection.cpp. References m_bConnected, m_hSocket, m_mInput, m_mOutput, m_nQueuedRun, m_tConnected, NULL, OnConnected(), OnDropped(), OnRead(), OnRun(), OnWrite(), TCPBandwidthMeter::pLimit, and TCPBandwidthMeter::tLast. Referenced by CNeighboursBase::OnRun(), CTransfers::OnRunTransfers(), and CHandshakes::RunHandshakes(). |
|
Definition at line 887 of file Connection.cpp. References CSettings::sUploads::BlockAgents, CSettings::sGnutella::BlockBlankClients, CSettings::Gnutella, m_sUserAgent, Settings, and CSettings::Uploads. Referenced by CShakeNeighbour::OnHeaderLine(), CDownloadTransferHTTP::OnHeaderLine(), CDownloadTransferFTP::OnHeaderLine(), and CUploadTransferHTTP::OnHeadersComplete(). |
|
|
Reimplemented in CBTClient, CChatSession, CDownloadTransferBT, CDownloadTransferED2K, CDownloadTransferFTP, CDownloadTransferHTTP, CEDClient, CEDNeighbour, CHandshake, CHostBrowser, CShakeNeighbour, CUploadTransferBT, and CUploadTransferED2K. Definition at line 377 of file Connection.cpp. Referenced by DoRun(), CShakeNeighbour::OnConnected(), CHostBrowser::OnConnected(), CHandshake::OnConnected(), and CChatSession::OnConnected(). |
|
Reimplemented in CBTClient, CChatSession, CDownloadTransferED2K, CDownloadTransferFTP, CDownloadTransferHTTP, CEDClient, CEDNeighbour, CHandshake, CHostBrowser, CNeighbour, CRemote, CShakeNeighbour, CUploadTransferED2K, and CUploadTransferHTTP. Definition at line 384 of file Connection.cpp. Referenced by DoRun(). |
|
Reimplemented in CChatSession, CDownloadTransferFTP, CDownloadTransferHTTP, CHostBrowser, CShakeNeighbour, CTransfer, and CUploadTransferHTTP. Definition at line 803 of file Connection.cpp. References CNetwork::AcquireLocalAddress(), GNUTELLA_DEFAULT_PORT, m_bInitiated, m_pHost, m_sUserAgent, and Network. Referenced by CTransfer::OnHeaderLine(), and ReadHeaders(). |
|
Reimplemented in CChatSession, CDownloadTransferHTTP, CHostBrowser, CRemote, CShakeNeighbour, and CUploadTransferHTTP. Definition at line 847 of file Connection.cpp. Referenced by ReadHeaders(). |
|
|
Reimplemented in CBTClient, CChatSession, CDownloadTransfer, CDownloadTransferBT, CDownloadTransferED2K, CDownloadTransferFTP, CDownloadTransferHTTP, CEDClient, CEDNeighbour, CG1Neighbour, CG2Neighbour, CHandshake, CHostBrowser, CNeighbour, CRemote, CShakeNeighbour, CUploadTransfer, CUploadTransferBT, CUploadTransferED2K, and CUploadTransferHTTP. Definition at line 390 of file Connection.cpp. Referenced by DoRun(), CUploadTransfer::OnRun(), CHostBrowser::OnRun(), CDownloadTransfer::OnRun(), and CBTClient::OnRun(). |
|
|
Definition at line 366 of file Connection.cpp. References m_nQueuedRun, and OnWrite(). Referenced by CNeighbour::DelayClose(), CG2Neighbour::Send(), CG1Neighbour::Send(), and CEDNeighbour::Send(). |
|
Definition at line 743 of file Connection.cpp. References m_pInput, m_sLastHeader, OnHeaderLine(), OnHeadersComplete(), OnWrite(), and CBuffer::ReadLine(). Referenced by CUploadTransferHTTP::OnRead(), CShakeNeighbour::OnRead(), CRemote::OnRead(), CHostBrowser::OnRead(), CDownloadTransferHTTP::OnRead(), and CChatSession::OnRead(). |
|
Definition at line 858 of file Connection.cpp. References CNetwork::IsListening(), CNetwork::m_pHost, m_pOutput, Network, and CBuffer::Print(). Referenced by CChatSession::OnConnected(), CUploadTransferHTTP::SendDefaultHeaders(), CShakeNeighbour::SendPrivateHeaders(), CShakeNeighbour::SendPublicHeaders(), and CDownloadTransferHTTP::SendRequest(). |
|
Definition at line 1148 of file Connection.cpp. Referenced by CDownloadTransferHTTP::OnHeaderLine(), CUploadTransferHTTP::OnHeadersComplete(), CChatSession::OnText(), and CChatSession::ReadHandshake(). |
|
|
Definition at line 1024 of file Connection.cpp. References NULL. Referenced by URLDecode(). |
|
Definition at line 1090 of file Connection.cpp. Referenced by URLDecode(). |
|
Definition at line 933 of file Connection.cpp. References NULL. Referenced by CURLExportDlg::OnCopy(), CURLCopyDlg::OnIncludeSelf(), CURLExportDlg::OnSave(), CShareazaURL::ParseShareazaFile(), CQueryHit::Resolve(), CDiscoveryServices::RunWebCacheUpdate(), CUploadTransferHTTP::SendDefaultHeaders(), CDownloadTransferHTTP::SendRequest(), and CFileExecutor::ShowBitziTicket(). |
|
Definition at line 73 of file Connection.h. Referenced by AcceptFrom(), AttachTo(), CConnection(), CEDClient::Close(), Close(), DoRun(), CChatCore::FindSession(), CEDClient::IsOnline(), CBTClient::OnDropped(), CEDClient::OnRun(), CDownloads::OnRun(), CBTClient::OnRun(), CChatWindows::OpenPrivate(), CDownloadSource::PushRequest(), and CDownloadTransferED2K::RunQueued(). |
|
|
|
|
|
Definition at line 90 of file Connection.h. Referenced by CConnection(), DoRun(), and QueueRun(). |
|
|
|
|
|
Definition at line 83 of file Connection.h. Referenced by CDownloadTransferFTP::OnRead(), and ReadHeaders(). |
|
|