26 std::make_shared<Buffer>() :
27 std::make_shared<Buffer>(size);
34 return std::make_shared<Buffer>(boost::asio::buffer(buffer));
38 return {
reinterpret_cast<const char *
>(buf.
data()), buf.
size()};
41 std::string
to_hex_string(
const Buffer &buf,
size_t length = 16u);
const_iterator begin() const noexcept
const value_type * data() const noexcept
Direct access to the allocated memory or nullptr if no memory is allocated.
size_type size() const noexcept
const_iterator end() const noexcept
This file contains definitions of common data structures used in traffic manager.
static std::ostream & operator<<(std::ostream &out, const Buffer &buf)
static bool operator==(const Buffer &lhs, const Buffer &rhs)
static bool operator!=(const Buffer &lhs, const Buffer &rhs)
static std::string as_string(const Buffer &buf)
static shared_buffer make_empty(size_t size=0u)
std::shared_ptr< Buffer > shared_buffer
std::string to_hex_string(const Buffer &buf, size_t length)
shared_buffer make_random(size_t size)
std::shared_ptr< const Buffer > const_shared_buffer
static shared_buffer make(const T &buffer)