20#ifndef RIPPLE_OVERLAY_MESSAGE_H_INCLUDED 
   21#define RIPPLE_OVERLAY_MESSAGE_H_INCLUDED 
   23#include <xrpld/overlay/Compression.h> 
   25#include <xrpl/basics/ByteUtilities.h> 
   26#include <xrpl/protocol/PublicKey.h> 
   27#include <xrpl/protocol/messages.h> 
   62        ::google::protobuf::Message 
const& message,
 
   63        protocol::MessageType type,
 
   71    messageSize(::google::protobuf::Message 
const& message);
 
   74    totalSize(::google::protobuf::Message 
const& message);
 
 
std::once_flag once_flag_
 
std::size_t getCategory() const
Get the traffic category.
 
compression::Compressed Compressed
 
void setHeader(std::uint8_t *in, std::uint32_t payloadBytes, int type, Algorithm compression, std::uint32_t uncompressedBytes)
Set the payload header.
 
std::vector< uint8_t > const & getBuffer(Compressed tryCompressed)
Retrieve the packed message data.
 
std::size_t getBufferSize()
Retrieve the size of the packed but uncompressed message data.
 
std::optional< PublicKey > const & getValidatorKey() const
Get the validator's key.
 
static std::size_t totalSize(::google::protobuf::Message const &message)
 
std::optional< PublicKey > validatorKey_
 
std::vector< uint8_t > buffer_
 
std::vector< uint8_t > bufferCompressed_
 
int getType(std::uint8_t const *in) const
Get the message type from the payload header.
 
void compress()
Try to compress the payload.
 
static std::size_t messageSize(::google::protobuf::Message const &message)
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
constexpr auto megabytes(T value) noexcept
 
constexpr std::size_t maximiumMessageSize