ED2KPacket::ReqChunks Class Reference

Requests (up to) three parts, indicated by the three ranges. More...

#include <packets.h>

Inheritance diagram for ED2KPacket::ReqChunks:

ED2KPacket::Packet List of all members.

Public Member Functions

 ReqChunks (const Hash< ED2KHash > &h, const std::list< Range32 > &reqparts)
 ReqChunks (std::istream &i)
 operator std::string ()
Hash< ED2KHash > getHash () const
uint8_t getReqChunkCount () const
Range32 getReqChunk (uint8_t n) const

Private Attributes

Hash< ED2KHash > m_hash
 Requested file hash.
std::vector< Range32 > m_reqChunks
 Requested chunks.

Detailed Description

Requests (up to) three parts, indicated by the three ranges.

Important: In ed2k network, the chunk range end offset is NOT included. This is different from hydranode Range implementation, where end offset is also included. The member m_reqChunks contains the ranges in hydranode Range format, and conversions to ed2k format are done during packet parsing.

Definition at line 782 of file packets.h.


Constructor & Destructor Documentation

ED2KPacket::ReqChunks::ReqChunks const Hash< ED2KHash > &  h,
const std::list< Range32 > &  reqparts
 

Definition at line 982 of file packets.cpp.

References m_hash, and m_reqChunks.

ED2KPacket::ReqChunks::ReqChunks std::istream &  i  ) 
 

Definition at line 990 of file packets.cpp.

References m_hash, and m_reqChunks.


Member Function Documentation

ED2KPacket::ReqChunks::operator std::string  ) 
 

Definition at line 1013 of file packets.cpp.

References m_hash, m_reqChunks, ED2KPacket::Packet::makePacket(), and OP_REQCHUNKS.

Hash<ED2KHash> ED2KPacket::ReqChunks::getHash  )  const [inline]
 

Definition at line 788 of file packets.h.

References m_hash.

uint8_t ED2KPacket::ReqChunks::getReqChunkCount  )  const [inline]
 

Definition at line 789 of file packets.h.

References m_reqChunks.

Range32 ED2KPacket::ReqChunks::getReqChunk uint8_t  n  )  const [inline]
 

Definition at line 790 of file packets.h.

References m_reqChunks.


Member Data Documentation

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

Requested file hash.

Definition at line 792 of file packets.h.

Referenced by getHash(), operator std::string(), and ReqChunks().

std::vector<Range32> ED2KPacket::ReqChunks::m_reqChunks [private]
 

Requested chunks.

Definition at line 793 of file packets.h.

Referenced by getReqChunk(), getReqChunkCount(), operator std::string(), and ReqChunks().


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