20 #ifndef RIPPLE_OVERLAY_MESSAGE_H_INCLUDED
21 #define RIPPLE_OVERLAY_MESSAGE_H_INCLUDED
23 #include <ripple/overlay/Compression.h>
24 #include <ripple/protocol/messages.h>
25 #include <boost/asio/buffer.hpp>
26 #include <boost/asio/buffers_iterator.hpp>
58 Message (::google::protobuf::Message
const& message,
int type);
std::vector< uint8_t > const & getBuffer(Compressed tryCompressed)
Retrieve the packed message data.
void compress()
Try to compress the payload.
int getType(std::uint8_t const *in) const
Get the message type from the payload header.
std::once_flag once_flag_
std::size_t getCategory() const
Get the traffic category.
void setHeader(std::uint8_t *in, std::uint32_t payloadBytes, int type, Algorithm comprAlgorithm, std::uint32_t uncompressedBytes)
Set the payload header.
Message(::google::protobuf::Message const &message, int type)
Constructor.
std::vector< uint8_t > buffer_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::vector< uint8_t > bufferCompressed_