Furrent
|
#include <message.hpp>
Public Member Functions | |
PieceMessage (int64_t index, int64_t begin, std::vector< uint8_t > block) | |
MessageKind | kind () const override |
Static Public Member Functions | |
static Result< std::unique_ptr< PieceMessage >, DecodeError > | decode (const std::vector< uint8_t > &buf) |
Public Attributes | |
const int64_t | index |
Index of the piece. More... | |
const int64_t | begin |
Offset from the beginning of the piece. More... | |
const std::vector< uint8_t > | block |
The actual bytes from the piece. More... | |
A message containing a subset of the bytes from a piece. <length=9+X><id=7><index><begin><block> where X is the length of the block.
|
inline |
|
static |
|
inlineoverridevirtual |
Returns the kind of this message. Used before dynamic_cast
ing when the underlying type is not known beforehand.
Implements fur::download::message::Message.
const int64_t fur::download::message::PieceMessage::begin |
Offset from the beginning of the piece.
const std::vector<uint8_t> fur::download::message::PieceMessage::block |
The actual bytes from the piece.
const int64_t fur::download::message::PieceMessage::index |
Index of the piece.