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

CHandshake Class Reference

#include <Handshake.h>

Inheritance diagram for CHandshake:

CConnection List of all members.

Public Member Functions

 CHandshake ()
 CHandshake (SOCKET hSocket, SOCKADDR_IN *pHost)
 CHandshake (CHandshake *pCopy)
virtual ~CHandshake ()
virtual BOOL Push (IN_ADDR *pAddress, WORD nPort, DWORD nIndex)

Public Attributes

BOOL m_bPushing
DWORD m_nIndex

Protected Member Functions

virtual BOOL OnRun ()
virtual BOOL OnConnected ()
virtual void OnDropped (BOOL bError)
virtual BOOL OnRead ()
BOOL OnAcceptGive ()
BOOL OnAcceptPush ()
BOOL OnPush (GGUID *pGUID)

Constructor & Destructor Documentation

CHandshake::CHandshake  ) 
 

Definition at line 57 of file Handshake.cpp.

References CSettings::Bandwidth, m_bPushing, CConnection::m_mInput, CConnection::m_mOutput, TCPBandwidthMeter::pLimit, CSettings::sBandwidth::Request, and Settings.

CHandshake::CHandshake SOCKET  hSocket,
SOCKADDR_IN *  pHost
 

Definition at line 69 of file Handshake.cpp.

References CConnection::AcceptFrom(), CSettings::Bandwidth, IDS_CONNECTION_ACCEPTED, m_bPushing, CConnection::m_mInput, CConnection::m_mOutput, CConnection::m_pHost, CConnection::m_sAddress, CShareazaApp::Message(), MSG_DEFAULT, TCPBandwidthMeter::pLimit, CSettings::sBandwidth::Request, Settings, and theApp.

CHandshake::CHandshake CHandshake pCopy  ) 
 

Definition at line 86 of file Handshake.cpp.

References CConnection::AttachTo(), CSettings::Bandwidth, m_bPushing, CConnection::m_mInput, CConnection::m_mOutput, m_nIndex, TCPBandwidthMeter::pLimit, CSettings::sBandwidth::Request, and Settings.

CHandshake::~CHandshake  )  [virtual]
 

Definition at line 100 of file Handshake.cpp.


Member Function Documentation

BOOL CHandshake::OnAcceptGive  )  [protected]
 

Definition at line 331 of file Handshake.cpp.

References IDS_DOWNLOAD_BAD_PUSH, IDS_DOWNLOAD_UNKNOWN_PUSH, CConnection::m_pHost, CConnection::m_pInput, CShareazaApp::Message(), MSG_ERROR, GGUID::n, OnPush(), CBuffer::ReadLine(), theApp, and CConnection::URLDecode().

Referenced by OnRead().

BOOL CHandshake::OnAcceptPush  )  [protected]
 

Definition at line 292 of file Handshake.cpp.

References IDS_DOWNLOAD_BAD_PUSH, IDS_DOWNLOAD_UNKNOWN_PUSH, CConnection::m_pHost, CConnection::m_pInput, CShareazaApp::Message(), MSG_ERROR, GGUID::n, OnPush(), CBuffer::ReadLine(), and theApp.

Referenced by OnRead().

BOOL CHandshake::OnConnected  )  [protected, virtual]
 

Reimplemented from CConnection.

Definition at line 160 of file Handshake.cpp.

References CGProfile::GUID, IDS_UPLOAD_GIV, m_nIndex, CConnection::m_pOutput, CShareazaApp::Message(), MSG_DEFAULT, MyProfile, GGUID::n, CConnection::OnConnected(), CConnection::OnWrite(), CBuffer::Print(), and theApp.

void CHandshake::OnDropped BOOL  bError  )  [protected, virtual]
 

Reimplemented from CConnection.

Definition at line 188 of file Handshake.cpp.

References IDS_UPLOAD_CONNECT_ERROR, m_bPushing, CConnection::m_sAddress, CShareazaApp::Message(), MSG_ERROR, and theApp.

BOOL CHandshake::OnPush GGUID pGUID  )  [protected]
 

Definition at line 392 of file Handshake.cpp.

References ChatCore, Downloads, CWindowManager::Find(), CConnection::m_hSocket, CShareazaApp::m_pSection, NULL, CChildWnd::OnPush(), CChatCore::OnPush(), CDownloads::OnPush(), CShareazaApp::SafeMainWnd(), and theApp.

Referenced by OnAcceptGive(), and OnAcceptPush().

BOOL CHandshake::OnRead  )  [protected, virtual]
 

Reimplemented from CConnection.

Definition at line 203 of file Handshake.cpp.

References BT_PROTOCOL_HEADER, BT_PROTOCOL_HEADER_LEN, BTClients, ChatCore, CSettings::sCommunity::ChatEnable, CSettings::Community, ED2K_C2C_HELLO, ED2K_PROTOCOL_EDONKEY, EDClients, IDS_HANDSHAKE_FAIL, CGProfile::IsValid(), CBuffer::m_nLength, CBuffer::m_pBuffer, CConnection::m_pInput, CConnection::m_pOutput, CShareazaApp::Message(), MSG_DEBUG, MSG_ERROR, MyProfile, Neighbours, CChatCore::OnAccept(), CNeighboursWithConnect::OnAccept(), CUploads::OnAccept(), CBTClients::OnAccept(), CEDClients::OnAccept(), OnAcceptGive(), OnAcceptPush(), CConnection::OnRead(), CConnection::OnWrite(), CBuffer::Print(), CBuffer::ReadLine(), Settings, theApp, and Uploads.

BOOL CHandshake::OnRun  )  [protected, virtual]
 

Reimplemented from CConnection.

Definition at line 142 of file Handshake.cpp.

References CSettings::Connection, IDS_HANDSHAKE_TIMEOUT, CConnection::m_sAddress, CConnection::m_tConnected, CShareazaApp::Message(), MSG_ERROR, Settings, theApp, and CSettings::sConnection::TimeoutHandshake.

BOOL CHandshake::Push IN_ADDR *  pAddress,
WORD  nPort,
DWORD  nIndex
[virtual]
 

Definition at line 111 of file Handshake.cpp.

References CConnection::ConnectTo(), Handshakes, IDS_UPLOAD_CONNECT, m_bPushing, CConnection::m_hSocket, m_nIndex, CHandshakes::m_pWakeup, CConnection::m_tConnected, CShareazaApp::Message(), MSG_DEFAULT, and theApp.

Referenced by CHandshakes::PushTo().


Member Data Documentation

BOOL CHandshake::m_bPushing
 

Definition at line 55 of file Handshake.h.

Referenced by CHandshake(), OnDropped(), and Push().

DWORD CHandshake::m_nIndex
 

Definition at line 56 of file Handshake.h.

Referenced by CHandshake(), OnConnected(), and Push().


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