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

CPacket Class Reference

#include <Packet.h>

Inheritance diagram for CPacket:

CBTPacket CEDPacket CG1Packet CG2Packet List of all members.

Public Types

enum  { seekStart, seekEnd }

Public Member Functions

virtual void Reset ()
virtual void ToBuffer (CBuffer *pBuffer) const =0
void Seek (DWORD nPosition, int nRelative=seekStart)
void Shorten (DWORD nLength)
virtual CString ReadString (DWORD nMaximum=0xFFFFFFFF)
virtual void WriteString (LPCTSTR pszString, BOOL bNull=TRUE)
virtual int GetStringLen (LPCTSTR pszString) const
virtual CString ReadStringUTF8 (DWORD nMaximum=0xFFFFFFFF)
virtual void WriteStringUTF8 (LPCTSTR pszString, BOOL bNull=TRUE)
virtual int GetStringLenUTF8 (LPCTSTR pszString) const
LPBYTE ReadZLib (DWORD nLength, DWORD *pnOutput, DWORD nSuggest=0)
void WriteZLib (LPCVOID pData, DWORD nLength)
BYTE * WriteGetPointer (DWORD nLength, DWORD nOffset=0xFFFFFFFF)
virtual LPCTSTR GetType () const
CString ToHex () const
CString ToASCII () const
virtual void Debug (LPCTSTR pszReason) const
void SmartDump (CNeighbour *pNeighbour, IN_ADDR *pUDP, BOOL bOutgoing) const
virtual BOOL GetRazaHash (SHA1 *pHash, DWORD nLength=0xFFFFFFFF) const
void RazaSign ()
BOOL RazaVerify () const
int GetRemaining ()
void Read (LPVOID pData, int nLength)
BYTE ReadByte ()
BYTE PeekByte ()
WORD ReadShortLE ()
WORD ReadShortBE ()
DWORD ReadLongLE ()
DWORD ReadLongBE ()
QWORD ReadInt64 ()
void Ensure (int nLength)
void Write (LPCVOID pData, int nLength)
void WriteByte (BYTE nValue)
void WriteShortLE (WORD nValue)
void WriteShortBE (WORD nValue)
void WriteLongLE (DWORD nValue)
void WriteLongBE (DWORD nValue)
void WriteInt64 (QWORD nValue)
void AddRef ()
void Release ()
void ReleaseChain ()
virtual void Delete ()=0

Public Attributes

PROTOCOLID m_nProtocol
CPacketm_pNext
DWORD m_nReference
BYTE * m_pBuffer
DWORD m_nBuffer
DWORD m_nLength
DWORD m_nPosition
BOOL m_bBigEndian

Protected Member Functions

 CPacket (PROTOCOLID nProtocol)
virtual ~CPacket ()

Static Protected Attributes

static CHAR m_szSCHAR [PACKET_BUF_SCHAR+1]
static WCHAR m_szWCHAR [PACKET_BUF_WCHAR+1]

Friends

class CPacketPool

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
seekStart 
seekEnd 

Definition at line 85 of file Packet.h.


Constructor & Destructor Documentation

CPacket::CPacket PROTOCOLID  nProtocol  )  [protected]
 

Definition at line 53 of file Packet.cpp.

References m_bBigEndian, m_nBuffer, m_nLength, m_nPosition, m_nProtocol, m_nReference, m_pBuffer, m_pNext, and NULL.

CPacket::~CPacket  )  [protected, virtual]
 

Definition at line 73 of file Packet.cpp.

References m_nReference, and m_pBuffer.


Member Function Documentation

void CPacket::AddRef  )  [inline]
 

Definition at line 385 of file Packet.h.

References m_nReference.

Referenced by CG1PacketBufferType::Add(), CPacketPool::New(), CBrowseFrameCtrl::OnPhysicalTree(), CBrowseFrameCtrl::OnVirtualTree(), and CG2Neighbour::Send().

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

Reimplemented in CEDPacket, CG1Packet, and CG2Packet.

Definition at line 492 of file Packet.cpp.

References m_nLength, m_pBuffer, CShareazaApp::Message(), MSG_DEBUG, and theApp.

Referenced by CG2Packet::Debug(), CG1Packet::Debug(), CEDPacket::Debug(), and CNeighbour::OnCommonHit().

virtual void CPacket::Delete  )  [inline, pure virtual]
 

Implemented in CBTPacket, CEDPacket, CG1Packet, and CG2Packet.

Referenced by Release().

void CPacket::Ensure int  nLength  )  [inline]
 

Definition at line 277 of file Packet.h.

References m_nBuffer, m_nLength, m_pBuffer, and PACKET_GROW.

Referenced by WriteByte(), WriteInt64(), WriteLongBE(), WriteLongLE(), WriteShortBE(), and WriteShortLE().

BOOL CPacket::GetRazaHash SHA1 pHash,
DWORD  nLength = 0xFFFFFFFF
const [virtual]
 

Reimplemented in CG1Packet.

Definition at line 553 of file Packet.cpp.

References CSHA::Add(), CSHA::Finish(), CSHA::GetHash(), m_nLength, and m_pBuffer.

int CPacket::GetRemaining  )  [inline]
 

Definition at line 155 of file Packet.h.

References m_nLength, and m_nPosition.

Referenced by CG2Packet::GetTo(), CBTClient::OnBeHandshake(), CUploadTransferBT::OnCancel(), CG1Neighbour::OnClusterAdvisor(), CDownloadTransferED2K::OnCompressedPart(), CEDClient::OnEmuleInfo(), CDownloadTransferED2K::OnFileStatus(), CDownloadTransferED2K::OnHashsetAnswer(), CDownloadTransferBT::OnHave(), CEDClient::OnHello(), CDownloadTransferBT::OnPiece(), CG2Neighbour::OnPush(), CDatagrams::OnPush(), CDownloadTransferED2K::OnQueueRank(), CDownloadTransferED2K::OnRankingInfo(), CUploadTransferED2K::OnRequestParts(), CDownloadTransferED2K::OnSendingPart(), CEDNeighbour::OnServerIdent(), CEDNeighbour::OnServerMessage(), CEDNeighbour::OnServerStatus(), CEDClients::OnServerStatus(), CEDClient::OnSourceAnswer(), CDownloadTransferBT::OnSourceResponse(), CQuerySearch::ReadG2Packet(), CG2Packet::ReadPacket(), CG2Packet::SeekToWrapped(), and CG1Neighbour::SendG2Push().

int CPacket::GetStringLen LPCTSTR  pszString  )  const [virtual]
 

Reimplemented in CG2Packet.

Definition at line 220 of file Packet.cpp.

References NULL.

Referenced by CChatSession::SendPrivateMessage(), CEDTag::Write(), CEDPacket::WriteEDString(), and CEDPacket::WriteLongEDString().

int CPacket::GetStringLenUTF8 LPCTSTR  pszString  )  const [virtual]
 

Definition at line 325 of file Packet.cpp.

References NULL.

Referenced by CChatSession::SendPrivateMessage(), CEDTag::Write(), CEDPacket::WriteEDString(), and CEDPacket::WriteLongEDString().

LPCTSTR CPacket::GetType  )  const [virtual]
 

Reimplemented in CBTPacket, CEDPacket, CG1Packet, and CG2Packet.

Definition at line 426 of file Packet.cpp.

References NULL.

Referenced by CPacketWnd::Process().

BYTE CPacket::PeekByte  )  [inline]
 

Definition at line 191 of file Packet.h.

References m_nLength, m_nPosition, and m_pBuffer.

void CPacket::RazaSign  ) 
 

Definition at line 570 of file Packet.cpp.

Referenced by CG1Neighbour::SendClusterAdvisor().

BOOL CPacket::RazaVerify  )  const
 

Definition at line 576 of file Packet.cpp.

Referenced by CG1Neighbour::OnClusterAdvisor().

void CPacket::Read LPVOID  pData,
int  nLength
[inline]
 

Definition at line 163 of file Packet.h.

References m_nLength, m_nPosition, and m_pBuffer.

Referenced by CQueryHit::FromPacket(), CChatSession::OnChatRequest(), CDownloadTransferED2K::OnCompressedPart(), CDownloadTransferED2K::OnFileStatus(), CDownloadTransferED2K::OnHashsetAnswer(), CEDClient::OnHello(), CG2Neighbour::OnLNI(), CG1Neighbour::OnPush(), CUploadTransferED2K::OnRequestParts(), CDownloadTransferED2K::OnSendingPart(), CEDNeighbour::OnServerIdent(), CEDClient::OnSourceAnswer(), CQueryHit::ReadEDPacket(), CQuerySearch::ReadG1Packet(), CQuerySearch::ReadG2Packet(), CG2Packet::ReadPacket(), CQueryHit::ReadXML(), and CG2Packet::SkipCompound().

BYTE CPacket::ReadByte  )  [inline]
 

Definition at line 180 of file Packet.h.

References m_nLength, m_nPosition, and m_pBuffer.

Referenced by CDownloadTransferBT::OnBitfield(), CEDClient::OnEmuleInfo(), CDownloadTransferED2K::OnFileComment(), CDownloadTransferED2K::OnFileStatus(), CQueryHashTable::OnPatch(), CG1Neighbour::OnPing(), CG1Neighbour::OnPush(), CQueryHashTable::OnReset(), CG2Packet::ReadPacket(), and CG2Packet::SkipCompound().

QWORD CPacket::ReadInt64  )  [inline]
 

Definition at line 262 of file Packet.h.

References m_bBigEndian, m_nLength, m_nPosition, m_pBuffer, and SWAP_64.

Referenced by CQuerySearch::ReadG2Packet().

DWORD CPacket::ReadLongBE  )  [inline]
 

Definition at line 247 of file Packet.h.

References m_bBigEndian, m_nLength, m_nPosition, m_pBuffer, and SWAP_LONG.

Referenced by CUploadTransferBT::OnCancel(), CDownloadTransferBT::OnHave(), CG2Neighbour::OnKHL(), CG2Neighbour::OnLNI(), CCrawlNode::OnNode(), CDownloadTransferBT::OnPiece(), CDatagrams::OnQueryKeyAnswer(), CQueryHashTable::OnReset(), CBrowseTreeCtrl::OnTreePacket(), and CQuerySearch::ReadG2Packet().

DWORD CPacket::ReadLongLE  )  [inline]
 

Definition at line 232 of file Packet.h.

References m_nLength, m_nPosition, and m_pBuffer.

Referenced by CG1Neighbour::OnClusterAdvisor(), CDownloadTransferED2K::OnCompressedPart(), CEDClient::OnEmuleInfo(), CDownloadTransferED2K::OnFileComment(), CEDClient::OnHello(), CG2Neighbour::OnKHL(), CG2Neighbour::OnLNI(), CCrawlNode::OnNode(), CG2Neighbour::OnPing(), CG2Neighbour::OnPush(), CG1Neighbour::OnPush(), CDatagrams::OnPush(), CDatagrams::OnQueryKeyAnswer(), CDatagrams::OnQueryKeyRequest(), CDownloadTransferED2K::OnQueueRank(), CQueryHashTable::OnReset(), CDownloadTransferED2K::OnSendingPart(), CEDNeighbour::OnServerIdent(), CEDNeighbour::OnServerStatus(), CEDClients::OnServerStatus(), CEDClient::OnSourceAnswer(), CQueryHit::ReadEDAddress(), CQuerySearch::ReadG2Packet(), CEDPacket::ReadLongEDString(), and CG1Neighbour::SendG2Push().

WORD CPacket::ReadShortBE  )  [inline]
 

Definition at line 217 of file Packet.h.

References m_bBigEndian, m_nLength, m_nPosition, m_pBuffer, and SWAP_SHORT.

Referenced by CG2Neighbour::OnKHL(), CG2Neighbour::OnLNI(), CCrawlNode::OnNode(), CG2Neighbour::OnPing(), CG2Neighbour::OnPush(), CDatagrams::OnPush(), CDatagrams::OnQueryKeyRequest(), and CQuerySearch::ReadG2Packet().

WORD CPacket::ReadShortLE  )  [inline]
 

Definition at line 202 of file Packet.h.

References m_nLength, m_nPosition, and m_pBuffer.

Referenced by CChatSession::OnChatMessage(), CG1Neighbour::OnClusterAdvisor(), CDownloadTransferED2K::OnFileStatus(), CDownloadTransferED2K::OnHashsetAnswer(), CEDClient::OnHello(), CG1Neighbour::OnPush(), CDownloadTransferED2K::OnRankingInfo(), CEDNeighbour::OnServerIdent(), CEDClient::OnSourceAnswer(), CQueryHit::ReadEDAddress(), CEDPacket::ReadEDString(), and CG1Neighbour::SendG2Push().

CString CPacket::ReadString DWORD  nMaximum = 0xFFFFFFFF  )  [virtual]
 

Reimplemented in CG2Packet.

Definition at line 134 of file Packet.cpp.

References m_nLength, m_nPosition, m_pBuffer, and NULL.

Referenced by CChatSession::OnChatMessage(), CDownloadTransferED2K::OnFileComment(), CEDPacket::ReadEDString(), and CEDPacket::ReadLongEDString().

CString CPacket::ReadStringUTF8 DWORD  nMaximum = 0xFFFFFFFF  )  [virtual]
 

Definition at line 239 of file Packet.cpp.

References m_nLength, m_nPosition, m_pBuffer, and NULL.

Referenced by CChatSession::OnChatMessage(), CDownloadTransferED2K::OnFileComment(), CEDPacket::ReadEDString(), and CEDPacket::ReadLongEDString().

LPBYTE CPacket::ReadZLib DWORD  nLength,
DWORD *  pnOutput,
DWORD  nSuggest = 0
 

Definition at line 344 of file Packet.cpp.

References CZLib::Decompress(), m_nLength, m_nPosition, m_pBuffer, and NULL.

void CPacket::Release  )  [inline]
 

Definition at line 392 of file Packet.h.

References Delete(), m_nReference, and NULL.

Referenced by CG1PacketBufferType::Add(), CG1PacketBufferType::Clear(), CDownloadWithTorrent::CreateBitfieldPacket(), CLocalSearch::DestroyPacket(), CUploadTransferED2K::DispatchNextChunk(), CLocalSearch::DispatchPacket(), CManagedSearch::ExecuteNeighbours(), CG1PacketBufferType::Get(), CEDPacket::InflateOrRelease(), CDatagrams::OnDatagram(), CBrowseFrameCtrl::OnPhysicalTree(), CEDNeighbour::OnRead(), CEDClient::OnRead(), CBTClient::OnRead(), CEDClient::OnSourceRequest(), CBrowseFrameCtrl::OnVirtualTree(), CG2Neighbour::OnWrite(), CG1Neighbour::OnWrite(), CG2Neighbour::ProcessPackets(), CG1Neighbour::ProcessPackets(), CChatSession::ReadPackets(), CChatSession::ReadPacketsED2K(), CUploadTransferHTTP::RequestHostBrowse(), CNeighboursWithRouting::RouteQuery(), CNeighbour::Send(), CG2Neighbour::Send(), CG1Neighbour::Send(), CDatagrams::Send(), CChatSession::Send(), CBTClient::Send(), CChatSession::SendPrivateMessage(), CHostBrowser::StreamPacketsG1(), CHostBrowser::StreamPacketsG2(), CBrowseFrameCtrl::~CBrowseFrameCtrl(), and CG2Neighbour::~CG2Neighbour().

void CPacket::ReleaseChain  )  [inline]
 

Definition at line 399 of file Packet.h.

References NULL.

void CPacket::Reset  )  [virtual]
 

Reimplemented in CG2Packet.

Definition at line 86 of file Packet.cpp.

References m_bBigEndian, m_nLength, m_nPosition, m_nReference, m_pNext, and NULL.

Referenced by CPacketPool::New(), and CG2Packet::Reset().

void CPacket::Seek DWORD  nPosition,
int  nRelative = seekStart
 

Definition at line 103 of file Packet.cpp.

References m_nLength, m_nPosition, and seekStart.

void CPacket::Shorten DWORD  nLength  ) 
 

Definition at line 121 of file Packet.cpp.

References m_nLength, and m_nPosition.

Referenced by CG1Neighbour::OnPush().

void CPacket::SmartDump CNeighbour pNeighbour,
IN_ADDR *  pUDP,
BOOL  bOutgoing
const
 

Definition at line 524 of file Packet.cpp.

References CWindowManager::Find(), CShareazaApp::m_pSafeWnd, CShareazaApp::m_pSection, NULL, CPacketWnd::Process(), and theApp.

Referenced by CDatagrams::OnDatagram(), CG2Neighbour::OnPacket(), CG1Neighbour::OnPacket(), CDatagrams::OnPacket(), CG2Neighbour::Send(), CG1Neighbour::Send(), and CDatagrams::Send().

CString CPacket::ToASCII  )  const
 

Definition at line 465 of file Packet.cpp.

References m_nLength, and m_pBuffer.

Referenced by CG2Packet::Debug(), CG1Packet::Debug(), CEDPacket::Debug(), and CPacketWnd::Process().

virtual void CPacket::ToBuffer CBuffer pBuffer  )  const [pure virtual]
 

Implemented in CBTPacket, CEDPacket, CG1Packet, and CG2Packet.

Referenced by CLocalSearch::DispatchPacket(), and CG2Neighbour::Send().

CString CPacket::ToHex  )  const
 

Definition at line 434 of file Packet.cpp.

References m_nLength, and m_pBuffer.

Referenced by CPacketWnd::Process().

void CPacket::Write LPCVOID  pData,
int  nLength
[inline]
 

Definition at line 293 of file Packet.h.

References m_nBuffer, m_nLength, m_pBuffer, and PACKET_GROW.

Referenced by CLocalSearch::AddHit(), CLocalSearch::AddHitG2(), CG2Packet::Clone(), CUploadTransferED2K::Close(), CLocalSearch::CreatePacketG2(), CUploadTransferED2K::DispatchNextChunk(), CNeighboursWithED2K::FindDonkeySources(), CG2Packet::New(), CG1Packet::New(), CEDPacket::New(), CChatSession::OnChatRequest(), CEDNeighbour::OnConnected(), CEDClient::OnFileRequest(), CEDClient::OnFileStatusRequest(), CEDClient::OnHashsetRequest(), CChatSession::OnProfileDelivery(), CG1Neighbour::OnPush(), CDatagrams::OnQuery(), CEDClient::OnSourceRequest(), CBTClient::OnSourceRequest(), CUploadTransferED2K::OpenFile(), CQueryHashTable::PatchTo(), CBTPacket::ReadBuffer(), CUploadTransferED2K::Request(), CDownloadTransferED2K::RunQueued(), CBTClient::SendBeHandshake(), CDownloadTransferED2K::SendFragmentRequests(), CG1Neighbour::SendG2Push(), CG2Neighbour::SendHAW(), CEDClient::SendHello(), CG2Neighbour::SendLNI(), CDownloadTransferED2K::SendPrimaryRequest(), CNetwork::SendPush(), CDownloadTransferED2K::SendSecondaryRequest(), CEDNeighbour::SendSharedDownload(), CEDNeighbour::SendSharedFiles(), CQuerySearch::ToEDPacket(), CQuerySearch::ToG2Packet(), CG2Packet::WritePacket(), WriteString(), CG2Packet::WriteString(), WriteStringUTF8(), CGGEPItem::WriteTo(), CLocalSearch::WriteTrailerG1(), CLocalSearch::WriteTrailerG2(), and WriteZLib().

void CPacket::WriteByte BYTE  nValue  )  [inline]
 

Definition at line 313 of file Packet.h.

References Ensure(), m_nBuffer, m_nLength, and m_pBuffer.

Referenced by CLocalSearch::AddHitG1(), CLocalSearch::AddHitG2(), CDownloadWithTorrent::CreateBitfieldPacket(), CLocalSearch::CreatePacketG1(), CLocalSearch::CreatePacketG2(), CEDClient::OnFileStatusRequest(), CG1Neighbour::OnPush(), CDatagrams::OnQuery(), CQueryHashTable::PatchTo(), CQueryHashTable::PatchToOldShareaza(), CEDClient::SendCommentsPacket(), CEDClient::SendEmuleInfo(), CG2Neighbour::SendHAW(), CEDClient::SendHello(), CG2Neighbour::SendKHL(), CNetwork::SendPush(), CQuerySearch::ToEDPacket(), CQuerySearch::ToG1Packet(), CQuerySearch::ToG2Packet(), CGGEPBlock::Write(), CEDTag::Write(), CG2Packet::WritePacket(), CG2Packet::WriteString(), CGGEPItem::WriteTo(), CLocalSearch::WriteTrailerG1(), and CLocalSearch::WriteTrailerG2().

BYTE * CPacket::WriteGetPointer DWORD  nLength,
DWORD  nOffset = 0xFFFFFFFF
 

Definition at line 388 of file Packet.cpp.

References m_nBuffer, m_nLength, m_pBuffer, and PACKET_GROW.

Referenced by CGProfile::CreateAvatar(), CG2Neighbour::OnPing(), CDatagrams::OnQueryKeyAnswer(), CEDClient::OnSourceRequest(), and CNeighboursWithRouting::RouteQuery().

void CPacket::WriteInt64 QWORD  nValue  )  [inline]
 

Definition at line 372 of file Packet.h.

References Ensure(), m_bBigEndian, m_nBuffer, m_nLength, m_pBuffer, and SWAP_64.

Referenced by CLocalSearch::AddHit(), CLocalSearch::AddHitG2(), and CQuerySearch::ToG2Packet().

void CPacket::WriteLongBE DWORD  nValue  )  [inline]
 

Definition at line 360 of file Packet.h.

References Ensure(), m_bBigEndian, m_nBuffer, m_nLength, m_pBuffer, and SWAP_LONG.

Referenced by CLocalSearch::AddHit(), CLocalSearch::AddHitG2(), CLocalSearch::AlbumToPacket(), CLocalSearch::CreatePacketG2(), CNeighboursWithG2::CreateQueryWeb(), CLocalSearch::FolderToPacket(), CDownloadTransferBT::OnChoked(), CDatagrams::OnCrawlRequest(), CDatagrams::OnQuery(), CG2Neighbour::OnQueryKeyReq(), CDatagrams::OnQueryKeyRequest(), CQueryHashTable::PatchTo(), CDownloadTransferBT::SendFinishedBlock(), CG2Neighbour::SendKHL(), CG2Neighbour::SendLNI(), CDownloadTransferBT::SendRequests(), CQuerySearch::ToG2Packet(), and CDownloadTransferBT::UnrequestRange().

void CPacket::WriteLongLE DWORD  nValue  )  [inline]
 

Definition at line 348 of file Packet.h.

References Ensure(), m_nBuffer, m_nLength, and m_pBuffer.

Referenced by CLocalSearch::AddHitG1(), CHubHorizonPool::AddHorizonHubs(), CG1Neighbour::CG1Neighbour(), CUploadTransferED2K::CheckRanking(), CLocalSearch::CreatePacketG1(), CLocalSearch::CreatePacketG2(), CNeighboursWithG2::CreateQueryWeb(), CUploadTransferED2K::DispatchNextChunk(), CManagedSearch::ExecuteG2Mesh(), CEDNeighbour::OnConnected(), CDatagrams::OnCrawlRequest(), CG1Neighbour::OnPing(), CG1Neighbour::OnPush(), CDatagrams::OnQuery(), CG2Neighbour::OnQueryKeyReq(), CDatagrams::OnQueryKeyRequest(), CG2Neighbour::OnRun(), CEDClient::OnSourceRequest(), CG1Neighbour::OnVendor(), CQueryHashTable::PatchTo(), CNeighboursWithED2K::PushDonkey(), CEDClients::RequestServerStatus(), CG1Neighbour::SendClusterAdvisor(), CEDClient::SendEmuleInfo(), CDownloadTransferED2K::SendFragmentRequests(), CG1Neighbour::SendG2Push(), CG2Neighbour::SendHAW(), CEDClient::SendHello(), CG2Neighbour::SendKHL(), CG2Neighbour::SendLNI(), CNetwork::SendPush(), CEDNeighbour::SendSharedDownload(), CEDNeighbour::SendSharedFiles(), CG2Neighbour::SendStartups(), CQuerySearch::ToEDPacket(), CHostCacheHost::ToG1Ping(), CQuerySearch::ToG2Packet(), CPongItem::ToPacket(), CEDTag::Write(), and CEDPacket::WriteLongEDString().

void CPacket::WriteShortBE WORD  nValue  )  [inline]
 

Definition at line 336 of file Packet.h.

References Ensure(), m_bBigEndian, m_nBuffer, m_nLength, m_pBuffer, and SWAP_SHORT.

Referenced by CLocalSearch::AddHitG2(), CHubHorizonPool::AddHorizonHubs(), CLocalSearch::CreatePacketG2(), CNeighboursWithG2::CreateQueryWeb(), CManagedSearch::ExecuteG2Mesh(), CDatagrams::OnCrawlRequest(), CDatagrams::OnQuery(), CG2Neighbour::OnQueryKeyReq(), CG2Neighbour::OnRun(), CG2Neighbour::SendHAW(), CG2Neighbour::SendKHL(), CG2Neighbour::SendLNI(), CNetwork::SendPush(), CG2Neighbour::SendStartups(), and CQuerySearch::ToG2Packet().

void CPacket::WriteShortLE WORD  nValue  )  [inline]
 

Definition at line 324 of file Packet.h.

References Ensure(), m_nBuffer, m_nLength, and m_pBuffer.

Referenced by CG1Neighbour::CG1Neighbour(), CUploadTransferED2K::CheckRanking(), CLocalSearch::CreatePacketG1(), CEDNeighbour::OnConnected(), CEDClient::OnFileStatusRequest(), CEDClient::OnHashsetRequest(), CG1Neighbour::OnPing(), CG1Neighbour::OnPush(), CUploadTransferED2K::OnReask(), CEDClient::OnSourceRequest(), CG1Neighbour::OnVendor(), CG1Neighbour::SendClusterAdvisor(), CG1Neighbour::SendG2Push(), CEDClient::SendHello(), CChatSession::SendPrivateMessage(), CNetwork::SendPush(), CEDNeighbour::SendSharedDownload(), CEDNeighbour::SendSharedFiles(), CQuerySearch::ToEDPacket(), CQuerySearch::ToG1Packet(), CHostCacheHost::ToG1Ping(), CPongItem::ToPacket(), CEDTag::Write(), CEDPacket::WriteEDString(), and CLocalSearch::WriteTrailerG1().

void CPacket::WriteString LPCTSTR  pszString,
BOOL  bNull = TRUE
[virtual]
 

Reimplemented in CG2Packet.

Definition at line 183 of file Packet.cpp.

References m_szSCHAR, NULL, PACKET_BUF_SCHAR, and Write().

Referenced by CLocalSearch::AddHitG1(), CChatSession::SendPrivateMessage(), CQuerySearch::ToG1Packet(), CEDTag::Write(), CEDPacket::WriteEDString(), CEDPacket::WriteLongEDString(), and CLocalSearch::WriteTrailerG1().

void CPacket::WriteStringUTF8 LPCTSTR  pszString,
BOOL  bNull = TRUE
[virtual]
 

Definition at line 288 of file Packet.cpp.

References m_szSCHAR, NULL, PACKET_BUF_SCHAR, and Write().

Referenced by CLocalSearch::AddHitG1(), CChatSession::SendPrivateMessage(), CQuerySearch::ToG1Packet(), CEDTag::Write(), CEDPacket::WriteEDString(), and CEDPacket::WriteLongEDString().

void CPacket::WriteZLib LPCVOID  pData,
DWORD  nLength
 

Definition at line 366 of file Packet.cpp.

References CZLib::Compress(), and Write().

Referenced by CQueryHashTable::PatchToOldShareaza().


Friends And Related Function Documentation

friend class CPacketPool [friend]
 

Definition at line 418 of file Packet.h.


Member Data Documentation

BOOL CPacket::m_bBigEndian
 

Definition at line 82 of file Packet.h.

Referenced by CG2Packet::CG2Packet(), CPacket(), CG2Packet::New(), CDatagrams::OnQueryKeyAnswer(), ReadInt64(), ReadLongBE(), CG2Packet::ReadPacket(), ReadShortBE(), Reset(), CG2Packet::Reset(), CNeighboursWithRouting::RouteQuery(), CG2Packet::SkipCompound(), CG2Packet::ToBuffer(), WriteInt64(), WriteLongBE(), CG2Packet::WritePacket(), and WriteShortBE().

DWORD CPacket::m_nBuffer
 

Definition at line 79 of file Packet.h.

Referenced by CPacket(), Ensure(), CEDPacket::InflateOrRelease(), Write(), WriteByte(), WriteGetPointer(), WriteInt64(), WriteLongBE(), WriteLongLE(), WriteShortBE(), and WriteShortLE().

DWORD CPacket::m_nLength
 

Definition at line 80 of file Packet.h.

Referenced by CG1Packet::CacheHash(), CG2Packet::Clone(), CPacket(), Debug(), CEDPacket::Deflate(), CUploadTransferED2K::DispatchNextChunk(), Ensure(), GetRazaHash(), CG1Packet::GetRazaHash(), GetRemaining(), CEDPacket::InflateOrRelease(), CG2Packet::New(), CG1Neighbour::OnHit(), CQueryHashTable::OnPacket(), CHostBrowser::OnPacket(), CQueryHashTable::OnPatch(), CG1Neighbour::OnPing(), CG1Neighbour::OnPush(), CG1Neighbour::OnQuery(), CQueryHashTable::OnReset(), CEDClient::OnSourceRequest(), PeekByte(), Read(), ReadByte(), ReadInt64(), ReadLongBE(), ReadLongLE(), ReadShortBE(), ReadShortLE(), ReadString(), CG2Packet::ReadString(), ReadStringUTF8(), ReadZLib(), Reset(), CNetwork::RouteHits(), Seek(), Shorten(), CG2Packet::SkipCompound(), ToASCII(), CG2Packet::ToBuffer(), CG1Packet::ToBuffer(), CEDPacket::ToBuffer(), CBTPacket::ToBuffer(), CEDPacket::ToBufferUDP(), ToHex(), Write(), CEDTag::Write(), WriteByte(), WriteGetPointer(), WriteInt64(), WriteLongBE(), WriteLongLE(), WriteShortBE(), and WriteShortLE().

DWORD CPacket::m_nPosition
 

Definition at line 81 of file Packet.h.

Referenced by CPacket(), GetRemaining(), CG2Packet::GetTo(), CChatSession::OnChatAnswer(), CChatSession::OnChatMessage(), CChatSession::OnChatRequest(), CDownloadTransferED2K::OnCompressedPart(), CCrawlNode::OnCrawl(), CDatagrams::OnCrawlRequest(), CDownloadTransferED2K::OnHashsetAnswer(), CG2Neighbour::OnKHL(), CG2Neighbour::OnLNI(), CCrawlNode::OnNode(), CQueryHashTable::OnPatch(), CDownloadTransferBT::OnPiece(), CG2Neighbour::OnPing(), CDatagrams::OnPong(), CG2Neighbour::OnProfileDelivery(), CChatSession::OnProfileDelivery(), CDatagrams::OnQueryKeyAnswer(), CDatagrams::OnQueryKeyRequest(), CDownloadTransferED2K::OnSendingPart(), CBrowseTreeCtrl::OnTreePacket(), PeekByte(), Read(), ReadByte(), CQuerySearch::ReadG2Packet(), ReadInt64(), ReadLongBE(), ReadLongLE(), ReadShortBE(), ReadShortLE(), ReadString(), CG2Packet::ReadString(), ReadStringUTF8(), ReadZLib(), Reset(), CNetwork::RouteHits(), CNeighboursWithRouting::RouteQuery(), Seek(), CG2Packet::SeekToWrapped(), CG2Neighbour::SendKHL(), Shorten(), and CG2Packet::SkipCompound().

PROTOCOLID CPacket::m_nProtocol
 

Definition at line 69 of file Packet.h.

Referenced by CPacket(), CNeighbour::OnCommonHit(), CQueryHashTable::OnReset(), CPacketWnd::Process(), CNetwork::RouteHits(), CNeighboursWithRouting::RouteQuery(), CG2Neighbour::Send(), CG1Neighbour::Send(), CDatagrams::Send(), CBTClient::Send(), CG2Neighbour::SendQuery(), CG1Neighbour::SendQuery(), and CEDNeighbour::SendQuery().

DWORD CPacket::m_nReference
 

Definition at line 73 of file Packet.h.

Referenced by AddRef(), CPacket(), CPacketPool::Delete(), Release(), Reset(), and ~CPacket().

BYTE* CPacket::m_pBuffer
 

Definition at line 78 of file Packet.h.

Referenced by CG1Packet::CacheHash(), CG2Packet::Clone(), CPacket(), Debug(), CEDPacket::Deflate(), Ensure(), GetRazaHash(), CG1Packet::GetRazaHash(), CG2Packet::GetTo(), CEDPacket::InflateOrRelease(), CG2Packet::New(), CBTClient::OnBeHandshake(), CDownloadTransferED2K::OnCompressedPart(), CDownloadTransferED2K::OnHashsetAnswer(), CQueryHashTable::OnPatch(), CDownloadTransferBT::OnPiece(), CDownloadTransferED2K::OnSendingPart(), CDownloadTransferBT::OnSourceResponse(), PeekByte(), Read(), ReadByte(), CQuerySearch::ReadG2Packet(), ReadInt64(), ReadLongBE(), ReadLongLE(), ReadShortBE(), ReadShortLE(), ReadString(), CG2Packet::ReadString(), ReadStringUTF8(), ReadZLib(), CNetwork::RouteHits(), CNeighboursWithRouting::RouteQuery(), CG2Packet::SeekToWrapped(), CG1Neighbour::SendClusterAdvisor(), CEDNeighbour::SendSharedFiles(), ToASCII(), CG2Packet::ToBuffer(), CG1Packet::ToBuffer(), CEDPacket::ToBuffer(), CBTPacket::ToBuffer(), CEDPacket::ToBufferUDP(), ToHex(), Write(), CEDTag::Write(), WriteByte(), WriteGetPointer(), WriteInt64(), WriteLongBE(), WriteLongLE(), WriteShortBE(), WriteShortLE(), and ~CPacket().

CPacket* CPacket::m_pNext
 

Definition at line 72 of file Packet.h.

Referenced by CPacket(), CPacketPool::Delete(), CPacketPool::New(), CPacketPool::NewPool(), and Reset().

CHAR CPacket::m_szSCHAR [static, protected]
 

Definition at line 45 of file Packet.cpp.

Referenced by WriteString(), CG2Packet::WriteString(), and WriteStringUTF8().

WCHAR CPacket::m_szWCHAR [static, protected]
 

Definition at line 46 of file Packet.cpp.


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