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

CBTPacket Class Reference

#include <BTPacket.h>

Inheritance diagram for CBTPacket:

CPacket List of all members.

Public Member Functions

virtual void ToBuffer (CBuffer *pBuffer) const
virtual LPCTSTR GetType () const
virtual void Delete ()

Static Public Member Functions

static CBTPacketReadBuffer (CBuffer *pBuffer)
static CBTPacketNew (BYTE nType)

Public Attributes

BYTE m_nType

Protected Member Functions

 CBTPacket ()
virtual ~CBTPacket ()

Static Protected Attributes

static CBTPacketPool POOL

Friends

class CBTPacket::CBTPacketPool

Classes

class  CBTPacketPool

Constructor & Destructor Documentation

CBTPacket::CBTPacket  )  [protected]
 

Definition at line 39 of file BTPacket.cpp.

References m_nType.

CBTPacket::~CBTPacket  )  [protected, virtual]
 

Definition at line 44 of file BTPacket.cpp.


Member Function Documentation

virtual void CBTPacket::Delete  )  [inline, virtual]
 

Implements CPacket.

Definition at line 73 of file BTPacket.h.

References CPacketPool::Delete(), and POOL.

LPCTSTR CBTPacket::GetType  )  const [virtual]
 

Reimplemented from CPacket.

Definition at line 97 of file BTPacket.cpp.

References m_nType.

static CBTPacket* CBTPacket::New BYTE  nType  )  [inline, static]
 

Definition at line 66 of file BTPacket.h.

References m_nType, CPacketPool::New(), and POOL.

Referenced by CDownloadTransferBT::Close(), CDownloadWithTorrent::CreateBitfieldPacket(), CBTClient::OnBeHandshake(), CDownloadTransferBT::OnChoked(), CDownloadTransferBT::OnRun(), CBTClient::OnSourceRequest(), ReadBuffer(), CBTClient::SendBeHandshake(), CDownloadTransferBT::SendFinishedBlock(), CDownloadTransferBT::SendRequests(), CUploadTransferBT::SetChoke(), CDownloadTransferBT::ShowInterest(), and CDownloadTransferBT::UnrequestRange().

CBTPacket * CBTPacket::ReadBuffer CBuffer pBuffer  )  [static]
 

Definition at line 72 of file BTPacket.cpp.

References BT_PACKET_KEEPALIVE, New(), NULL, SWAP_LONG, and CPacket::Write().

Referenced by CBTClient::OnRead().

void CBTPacket::ToBuffer CBuffer pBuffer  )  const [virtual]
 

Implements CPacket.

Definition at line 51 of file BTPacket.cpp.

References CBuffer::Add(), BT_PACKET_KEEPALIVE, CPacket::m_nLength, m_nType, CPacket::m_pBuffer, NULL, and SWAP_LONG.

Referenced by CBTClient::Send().


Friends And Related Function Documentation

friend class CBTPacket::CBTPacketPool [friend]
 

Definition at line 78 of file BTPacket.h.


Member Data Documentation

BYTE CBTPacket::m_nType
 

Definition at line 42 of file BTPacket.h.

Referenced by CBTPacket(), GetType(), New(), CBTClient::OnPacket(), and ToBuffer().

CBTPacket::CBTPacketPool CBTPacket::POOL [static, protected]
 

Definition at line 33 of file BTPacket.cpp.

Referenced by Delete(), and New().


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