11#include <rpc/msgpack.hpp>
20 namespace mp = ::clmdep_msgpack;
23 return Buffer(
reinterpret_cast<const unsigned char *
>(sbuf.data()), sbuf.size());
28 namespace mp = ::clmdep_msgpack;
29 return mp::unpack(
reinterpret_cast<const char *
>(buffer.
data()), buffer.
size()).template as<T>();
33 static T
UnPack(
const unsigned char *data,
size_t size) {
34 namespace mp = ::clmdep_msgpack;
35 return mp::unpack(
reinterpret_cast<const char *
>(data), size).template as<T>();
const value_type * data() const noexcept
Direct access to the allocated memory or nullptr if no memory is allocated.
size_type size() const noexcept
static T UnPack(const Buffer &buffer)
static T UnPack(const unsigned char *data, size_t size)
static Buffer Pack(const T &obj)
This file contains definitions of common data structures used in traffic manager.