async_mqtt 5.0.0
Loading...
Searching...
No Matches
async_mqtt::v3_1_1::basic_puback_packet< PacketIdBytes > Class Template Reference

MQTT PUBACK packet (v3.1.1) More...

#include <v3_1_1_puback.hpp>

Public Member Functions

 basic_puback_packet (packet_id_t packet_id)
 constructor
 
std::vector< as::const_buffer > const_buffer_sequence () const
 Create const buffer sequence it is for boost asio APIs.
 
std::size_t size () const
 Get packet size.
 
packet_id_t packet_id () const
 Get packet_id.
 

Static Public Member Functions

static constexpr std::size_t num_of_const_buffer_sequence ()
 Get number of element of const_buffer_sequence.
 

Related Symbols

(Note that these are not member symbols.)

using puback_packet = basic_puback_packet<2>
 Type alias of basic_puback_packet (PacketIdBytes=2).
 

Detailed Description

template<std::size_t PacketIdBytes>
class async_mqtt::v3_1_1::basic_puback_packet< PacketIdBytes >

MQTT PUBACK packet (v3.1.1)

Template Parameters
PacketIdBytessize of packet_id

If basic_endpoint::set_auto_pub_response() is called with true, then this packet is automatically sent when PUBLISH (QoS1) v3_1_1::basic_publish_packet is received.

When the packet is received, the packet_id is automatically released and become reusable.
See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718043

Constructor & Destructor Documentation

◆ basic_puback_packet()

template<std::size_t PacketIdBytes>
async_mqtt::v3_1_1::basic_puback_packet< PacketIdBytes >::basic_puback_packet ( packet_id_t packet_id)
inline

constructor

Parameters
packet_idMQTT PacketIdentifier that is corresponding to the PUBLISH(QoS1) packet

Member Function Documentation

◆ const_buffer_sequence()

template<std::size_t PacketIdBytes>
std::vector< as::const_buffer > async_mqtt::v3_1_1::basic_puback_packet< PacketIdBytes >::const_buffer_sequence ( ) const
inline

Create const buffer sequence it is for boost asio APIs.

Returns
const buffer sequence

◆ num_of_const_buffer_sequence()

template<std::size_t PacketIdBytes>
static constexpr std::size_t async_mqtt::v3_1_1::basic_puback_packet< PacketIdBytes >::num_of_const_buffer_sequence ( )
inlinestaticconstexpr

Get number of element of const_buffer_sequence.

Returns
number of element of const_buffer_sequence

◆ packet_id()

template<std::size_t PacketIdBytes>
packet_id_t async_mqtt::v3_1_1::basic_puback_packet< PacketIdBytes >::packet_id ( ) const
inline

Get packet_id.

Returns
packet_id

◆ size()

template<std::size_t PacketIdBytes>
std::size_t async_mqtt::v3_1_1::basic_puback_packet< PacketIdBytes >::size ( ) const
inline

Get packet size.

Returns
packet size

The documentation for this class was generated from the following files: