7#if !defined(ASYNC_MQTT_PACKET_HPP)
8#define ASYNC_MQTT_PACKET_HPP
10#include <async_mqtt/buffer.hpp>
11#include <async_mqtt/util/static_vector.hpp>
12#include <async_mqtt/packet/fixed_header.hpp>
18class header_only_packet {
23 header_only_packet(control_packet_type type, std::uint8_t flags)
24 : packet_ { static_cast<char>(make_fixed_header(type, flags)), 0 }
32 std::vector<as::const_buffer> const_buffer_sequence()
const {
33 return { as::buffer(packet_.data(), packet_.size()) };
40 std::size_t size()
const {
41 return packet_.size();
48 static constexpr std::size_t num_of_const_buffer_sequence() {
58 std::string continuous_buffer()
const {
59 return std::string(packet_.data(), size());
62 static_vector<char, 2> packet_;