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

CEDPacket Class Reference

#include <EDPacket.h>

Inheritance diagram for CEDPacket:

CPacket List of all members.

Public Member Functions

CString ReadEDString (DWORD ServerFlags)
void WriteEDString (LPCTSTR psz, DWORD ServerFlags)
CString ReadEDString (BOOL bUnicode)
void WriteEDString (LPCTSTR psz, BOOL bUnicode)
CString ReadLongEDString (BOOL bUnicode)
void WriteLongEDString (LPCTSTR psz, BOOL bUnicode)
BOOL Deflate ()
BOOL InflateOrRelease (BYTE nEdProtocol)
virtual void ToBuffer (CBuffer *pBuffer) const
virtual void ToBufferUDP (CBuffer *pBuffer) const
virtual LPCTSTR GetType () const
virtual void Debug (LPCTSTR pszReason) const
virtual void Delete ()

Static Public Member Functions

static CEDPacketReadBuffer (CBuffer *pBuffer, BYTE nEdProtocol)
static BOOL IsLowID (DWORD nID)
static CEDPacketNew (BYTE nType, BYTE nProtocol=ED2K_PROTOCOL_EDONKEY)
static CEDPacketNew (ED2K_TCP_HEADER *pHeader)
static CEDPacketNew (ED2K_UDP_HEADER *pHeader, DWORD nLength)

Public Attributes

BYTE m_nEdProtocol
BYTE m_nType

Protected Member Functions

 CEDPacket ()
virtual ~CEDPacket ()

Static Protected Attributes

static ED2K_PACKET_DESC m_pszTypes []
static CEDPacketPool POOL

Friends

class CEDPacket::CEDPacketPool

Classes

class  CEDPacketPool

Constructor & Destructor Documentation

CEDPacket::CEDPacket  )  [protected]
 

Definition at line 41 of file EDPacket.cpp.

CEDPacket::~CEDPacket  )  [protected, virtual]
 

Definition at line 45 of file EDPacket.cpp.


Member Function Documentation

void CEDPacket::Debug LPCTSTR  pszReason  )  const [virtual]
 

Reimplemented from CPacket.

Definition at line 257 of file EDPacket.cpp.

References CPacket::Debug(), ED2K_C2C_COMPRESSEDPART, ED2K_C2C_HASHSETANSWER, ED2K_C2C_SENDINGPART, GetType(), m_nType, and CPacket::ToASCII().

BOOL CEDPacket::Deflate  ) 
 

Definition at line 173 of file EDPacket.cpp.

References CZLib::Compress(), ED2K_PROTOCOL_EDONKEY, ED2K_PROTOCOL_EMULE, ED2K_PROTOCOL_PACKED, m_nEdProtocol, CPacket::m_nLength, CPacket::m_pBuffer, and NULL.

Referenced by CEDNeighbour::SendSharedDownload(), and CEDNeighbour::SendSharedFiles().

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

Implements CPacket.

Definition at line 148 of file EDPacket.h.

References CPacketPool::Delete(), and POOL.

LPCTSTR CEDPacket::GetType  )  const [virtual]
 

Reimplemented from CPacket.

Definition at line 241 of file EDPacket.cpp.

References m_nType.

Referenced by Debug().

BOOL CEDPacket::InflateOrRelease BYTE  nEdProtocol  ) 
 

Definition at line 204 of file EDPacket.cpp.

References CZLib::Decompress(), ED2K_PROTOCOL_PACKED, CPacket::m_nBuffer, m_nEdProtocol, CPacket::m_nLength, CPacket::m_pBuffer, NULL, and CPacket::Release().

Referenced by CDatagrams::OnDatagram(), and ReadBuffer().

static BOOL CEDPacket::IsLowID DWORD  nID  )  [inline, static]
 

Definition at line 101 of file EDPacket.h.

Referenced by CDownloadSource::CDownloadSource(), CEDClients::Connect(), CEDClient::Connect(), CEDClient::Equals(), CEDClient::GetSourceURL(), CEDClient::OnFileStatusRequest(), CEDNeighbour::OnIdChange(), CNeighbourTipCtrl::OnPaint(), CRemote::PageNetworkNetwork(), CNeighboursWithED2K::PushDonkey(), CQueryHit::ReadEDAddress(), CEDNeighbour::SendSharedDownload(), CEDNeighbour::SendSharedFiles(), and CNeighboursWnd::Update().

static CEDPacket* CEDPacket::New ED2K_UDP_HEADER pHeader,
DWORD  nLength
[inline, static]
 

Definition at line 139 of file EDPacket.h.

References m_nEdProtocol, m_nType, CPacketPool::New(), ED2K_UDP_HEADER::nProtocol, ED2K_UDP_HEADER::nType, POOL, and CPacket::Write().

static CEDPacket* CEDPacket::New ED2K_TCP_HEADER pHeader  )  [inline, static]
 

Definition at line 130 of file EDPacket.h.

References m_nEdProtocol, m_nType, CPacketPool::New(), ED2K_TCP_HEADER::nLength, ED2K_TCP_HEADER::nProtocol, ED2K_TCP_HEADER::nType, POOL, and CPacket::Write().

static CEDPacket* CEDPacket::New BYTE  nType,
BYTE  nProtocol = ED2K_PROTOCOL_EDONKEY
[inline, static]
 

Definition at line 122 of file EDPacket.h.

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

Referenced by CUploadTransferED2K::CheckRanking(), CUploadTransferED2K::Close(), CUploadTransferED2K::DispatchNextChunk(), CManagedSearch::ExecuteNeighbours(), CNeighboursWithED2K::FindDonkeySources(), CEDNeighbour::OnConnected(), CDatagrams::OnDatagram(), CEDClient::OnFileRequest(), CEDClient::OnFileStatusRequest(), CEDClient::OnHashsetRequest(), CEDNeighbour::OnIdChange(), CUploadTransferED2K::OnQueueKick(), CUploadTransferED2K::OnReask(), CEDClient::OnSourceRequest(), CEDClients::OnUDP(), CUploadTransferED2K::OpenFile(), CNeighboursWithED2K::PushDonkey(), ReadBuffer(), CUploadTransferED2K::Request(), CEDClients::RequestServerStatus(), CDownloadTransferED2K::RunQueued(), CEDClient::SendCommentsPacket(), CEDClient::SendEmuleInfo(), CDownloadTransferED2K::SendFragmentRequests(), CEDClient::SendHello(), CDownloadTransferED2K::SendPrimaryRequest(), CChatSession::SendPrivateMessage(), CDownloadTransferED2K::SendSecondaryRequest(), CEDNeighbour::SendSharedDownload(), CEDNeighbour::SendSharedFiles(), CUploadTransferED2K::ServeRequests(), CUploadTransferED2K::StartNextRequest(), and CQuerySearch::ToEDPacket().

CEDPacket * CEDPacket::ReadBuffer CBuffer pBuffer,
BYTE  nEdProtocol
[static]
 

Definition at line 156 of file EDPacket.cpp.

References ED2K_PROTOCOL_EDONKEY, ED2K_PROTOCOL_EMULE, ED2K_PROTOCOL_PACKED, InflateOrRelease(), New(), and NULL.

Referenced by CEDNeighbour::OnRead(), CEDClient::OnRead(), CChatSession::ReadPacketsED2K(), and CChatSession::SendPacketsED2K().

CString CEDPacket::ReadEDString BOOL  bUnicode  ) 
 

Definition at line 79 of file EDPacket.cpp.

References CPacket::ReadShortLE(), CPacket::ReadString(), and CPacket::ReadStringUTF8().

CString CEDPacket::ReadEDString DWORD  ServerFlags  ) 
 

Definition at line 52 of file EDPacket.cpp.

References ED2K_SERVER_TCP_UNICODE, CPacket::ReadShortLE(), CPacket::ReadString(), and CPacket::ReadStringUTF8().

Referenced by CEDNeighbour::OnServerMessage().

CString CEDPacket::ReadLongEDString BOOL  bUnicode  ) 
 

Definition at line 107 of file EDPacket.cpp.

References CPacket::ReadLongLE(), CPacket::ReadString(), and CPacket::ReadStringUTF8().

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

Implements CPacket.

Definition at line 137 of file EDPacket.cpp.

References CBuffer::Add(), m_nEdProtocol, CPacket::m_nLength, m_nType, CPacket::m_pBuffer, ED2K_TCP_HEADER::nLength, ED2K_TCP_HEADER::nProtocol, and ED2K_TCP_HEADER::nType.

Referenced by CChatSession::SendPrivateMessage().

void CEDPacket::ToBufferUDP CBuffer pBuffer  )  const [virtual]
 

Definition at line 147 of file EDPacket.cpp.

References m_nEdProtocol, CPacket::m_nLength, m_nType, CPacket::m_pBuffer, ED2K_UDP_HEADER::nProtocol, and ED2K_UDP_HEADER::nType.

void CEDPacket::WriteEDString LPCTSTR  psz,
BOOL  bUnicode
 

Definition at line 88 of file EDPacket.cpp.

References CPacket::GetStringLen(), CPacket::GetStringLenUTF8(), CPacket::WriteShortLE(), CPacket::WriteString(), and CPacket::WriteStringUTF8().

void CEDPacket::WriteEDString LPCTSTR  psz,
DWORD  ServerFlags
 

Definition at line 61 of file EDPacket.cpp.

References ED2K_SERVER_TCP_UNICODE, CPacket::GetStringLen(), CPacket::GetStringLenUTF8(), CPacket::WriteShortLE(), CPacket::WriteString(), and CPacket::WriteStringUTF8().

Referenced by CEDClient::OnFileRequest(), CQuerySearch::ToEDPacket(), and CEDTag::Write().

void CEDPacket::WriteLongEDString LPCTSTR  psz,
BOOL  bUnicode
 

Definition at line 116 of file EDPacket.cpp.

References CPacket::GetStringLen(), CPacket::GetStringLenUTF8(), CPacket::WriteLongLE(), CPacket::WriteString(), and CPacket::WriteStringUTF8().

Referenced by CEDClient::SendCommentsPacket().


Friends And Related Function Documentation

friend class CEDPacket::CEDPacketPool [friend]
 

Definition at line 153 of file EDPacket.h.


Member Data Documentation

BYTE CEDPacket::m_nEdProtocol
 

Definition at line 78 of file EDPacket.h.

Referenced by Deflate(), InflateOrRelease(), New(), CChatSession::ReadPacketsED2K(), CChatSession::SendPrivateMessage(), ToBuffer(), and ToBufferUDP().

BYTE CEDPacket::m_nType
 

Definition at line 79 of file EDPacket.h.

Referenced by CEDTag::Check(), Debug(), GetType(), New(), CDownloadTransferED2K::OnCompressedPart(), CEDClient::OnEmuleInfo(), CEDClient::OnFileRequest(), CDownloadTransferED2K::OnFileStatus(), CEDClient::OnFileStatusRequest(), CDownloadTransferED2K::OnHashsetAnswer(), CEDClient::OnHello(), CDownloadTransferED2K::OnQueueRank(), CDownloadTransferED2K::OnRankingInfo(), CUploadTransferED2K::OnRequestParts(), CDownloadTransferED2K::OnSendingPart(), CEDClient::OnSourceAnswer(), CEDClients::OnUDP(), CChatSession::ReadPacketsED2K(), ToBuffer(), and ToBufferUDP().

ED2K_PACKET_DESC CEDPacket::m_pszTypes [static, protected]
 

Definition at line 585 of file EDPacket.cpp.

CEDPacket::CEDPacketPool CEDPacket::POOL [static, protected]
 

Definition at line 35 of file EDPacket.cpp.

Referenced by Delete(), and New().


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