async_mqtt 9.0.1
Loading...
Searching...
No Matches
buffer_to_packet_variant.hpp
1// Copyright Takatoshi Kondo 2022
2//
3// Distributed under the Boost Software License, Version 1.0.
4// (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt)
6
7#if !defined(ASYNC_MQTT_BUFFER_TO_PACKET_VARIANT_HPP)
8#define ASYNC_MQTT_BUFFER_TO_PACKET_VARIANT_HPP
9
10#include <async_mqtt/error.hpp>
11#include <async_mqtt/protocol_version.hpp>
12#include <async_mqtt/packet/packet_variant_fwd.hpp>
13#include <async_mqtt/util/buffer.hpp>
14
15namespace async_mqtt {
16
25template <std::size_t PacketIdBytes>
27
37
38} // namespace async_mqtt
39
40#endif // ASYNC_MQTT_BUFFER_TO_PACKET_VARIANT_HPP
The varaint type of all packets and system_error.
Definition packet_variant_fwd.hpp:37
buffer that has string_view interface and shared ownership This class is only for advanced usecase su...
Definition buffer.hpp:46
sys::error_code error_code
sys is a namespace alias of boost::sytem.
Definition error.hpp:56
protocol_version
MQTT protocol version.
Definition protocol_version.hpp:29
basic_packet_variant< PacketIdBytes > buffer_to_basic_packet_variant(buffer buf, protocol_version ver, error_code &ec)
create basic_packet_variant from the buffer
packet_variant buffer_to_packet_variant(buffer buf, protocol_version ver, error_code &ec)
create packet_variant from the buffer