Mads
Multi-Agent Distributed System
Loading...
Searching...
No Matches
wire_format.hpp File Reference
#include <cstdint>
#include <cstring>
#include <nlohmann/json.hpp>
#include <snappy.h>
#include <string>
#include "../mads.hpp"

Go to the source code of this file.

Classes

struct  Mads::detail::WireHeader
 

Namespaces

namespace  Mads
 
namespace  Mads::detail
 

Enumerations

enum class  Mads::detail::Comp : uint8_t { Mads::detail::None = 0 , Mads::detail::Snappy = 1 }
 

Functions

std::string Mads::detail::make_wire_header (WireFormat fmt, Comp comp, bool has_blob)
 
bool Mads::detail::parse_wire_header (const std::string &part, WireHeader &out)
 
Comp Mads::detail::resolve_compression (Compression policy, size_t size)
 
std::string Mads::detail::encode_payload (const nlohmann::json &j, WireFormat fmt)
 
bool Mads::detail::decode_to_json_text (const std::string &raw, uint8_t format, uint8_t comp, std::string &json_text_out)
 

Variables

constexpr char Mads::detail::WIRE_MAGIC [4] = {'M', 'A', 'D', 'S'}
 
constexpr uint8_t Mads::detail::WIRE_HDR_VERSION = 1
 
constexpr uint8_t Mads::detail::WIRE_FLAG_BLOB = 0x01
 
constexpr size_t Mads::detail::WIRE_HEADER_SIZE