ED2KPacket::PackedChunk Class Reference

Emule extended packet, this contains packed data chunk. More...

#include <packets.h>

Inheritance diagram for ED2KPacket::PackedChunk:

ED2KPacket::Packet List of all members.

Public Member Functions

 PackedChunk (Hash< ED2KHash > hash, uint32_t begin, uint32_t size, const std::string &data)
 PackedChunk (std::istream &i)
 operator std::string ()
const std::string & getData () const
uint32_t getBegin () const
uint32_t getSize () const

Private Attributes

Hash< ED2KHash > m_hash
 File hash where the data belongs to.
uint32_t m_begin
 Data begin offset.
uint32_t m_size
 Size of entire packed data chunk.
std::string m_data
 Part of the packed data chunk.

Detailed Description

Emule extended packet, this contains packed data chunk.

This packet contains only part of the entire packed data stream. In ed2k protocol, a 180k chunk is compressed, and spread over 10k chunks and sent separately. The size member of this packet indicates the total size of the packed data (out of which 10kb or so was sent in this packet).

Definition at line 827 of file packets.h.


Constructor & Destructor Documentation

ED2KPacket::PackedChunk::PackedChunk Hash< ED2KHash >  hash,
uint32_t  begin,
uint32_t  size,
const std::string &  data
 

Definition at line 1071 of file packets.cpp.

References PR_EMULE.

ED2KPacket::PackedChunk::PackedChunk std::istream &  i  ) 
 

Definition at line 1083 of file packets.cpp.

References m_begin, m_data, m_hash, m_size, and PR_EMULE.


Member Function Documentation

ED2KPacket::PackedChunk::operator std::string  ) 
 

Definition at line 1090 of file packets.cpp.

References m_begin, m_data, m_hash, m_size, ED2KPacket::Packet::makePacket(), and OP_PACKEDCHUNK.

const std::string& ED2KPacket::PackedChunk::getData  )  const [inline]
 

Definition at line 836 of file packets.h.

References m_data.

uint32_t ED2KPacket::PackedChunk::getBegin  )  const [inline]
 

Definition at line 837 of file packets.h.

References m_begin.

uint32_t ED2KPacket::PackedChunk::getSize  )  const [inline]
 

Definition at line 838 of file packets.h.

References m_size.


Member Data Documentation

Hash<ED2KHash> ED2KPacket::PackedChunk::m_hash [private]
 

File hash where the data belongs to.

Definition at line 840 of file packets.h.

Referenced by operator std::string(), and PackedChunk().

uint32_t ED2KPacket::PackedChunk::m_begin [private]
 

Data begin offset.

Definition at line 841 of file packets.h.

Referenced by getBegin(), operator std::string(), and PackedChunk().

uint32_t ED2KPacket::PackedChunk::m_size [private]
 

Size of entire packed data chunk.

Definition at line 842 of file packets.h.

Referenced by getSize(), operator std::string(), and PackedChunk().

std::string ED2KPacket::PackedChunk::m_data [private]
 

Part of the packed data chunk.

Definition at line 843 of file packets.h.

Referenced by getData(), operator std::string(), and PackedChunk().


The documentation for this class was generated from the following files: