ED2KPacket::DataChunk Class Reference

DataChunk packet indicates a single data chunk send from one client to another. More...

#include <packets.h>

Inheritance diagram for ED2KPacket::DataChunk:

ED2KPacket::Packet List of all members.

Public Member Functions

 DataChunk (Hash< ED2KHash > hash, uint32_t begin, uint32_t end, const std::string &data)
 DataChunk (std::istream &i)
 operator std::string ()
const std::string & getData () const
uint32_t getBegin () const
uint32_t getEnd () const

Private Attributes

Hash< ED2KHash > m_hash
 File hash where the data belongs to.
uint32_t m_begin
 Begin offset (inclusive).
uint32_t m_end
 End offset (exclusive).
std::string m_data
 The data.

Detailed Description

DataChunk packet indicates a single data chunk send from one client to another.

Definition at line 800 of file packets.h.


Constructor & Destructor Documentation

ED2KPacket::DataChunk::DataChunk Hash< ED2KHash >  hash,
uint32_t  begin,
uint32_t  end,
const std::string &  data
 

Definition at line 1045 of file packets.cpp.

References m_begin, m_data, and m_end.

ED2KPacket::DataChunk::DataChunk std::istream &  i  ) 
 

Definition at line 1053 of file packets.cpp.

References m_begin, m_data, m_end, and m_hash.


Member Function Documentation

ED2KPacket::DataChunk::operator std::string  ) 
 

Definition at line 1059 of file packets.cpp.

References m_begin, m_data, m_end, m_hash, ED2KPacket::Packet::makePacket(), and OP_SENDINGCHUNK.

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

Definition at line 809 of file packets.h.

References m_data.

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

Definition at line 810 of file packets.h.

References m_begin.

uint32_t ED2KPacket::DataChunk::getEnd  )  const [inline]
 

Definition at line 811 of file packets.h.

References m_end.


Member Data Documentation

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

File hash where the data belongs to.

Definition at line 813 of file packets.h.

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

uint32_t ED2KPacket::DataChunk::m_begin [private]
 

Begin offset (inclusive).

Definition at line 814 of file packets.h.

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

uint32_t ED2KPacket::DataChunk::m_end [private]
 

End offset (exclusive).

Definition at line 815 of file packets.h.

Referenced by DataChunk(), getEnd(), and operator std::string().

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

The data.

Definition at line 816 of file packets.h.

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


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