async_mqtt 5.0.0
Loading...
Searching...
No Matches
async_mqtt::v5::basic_pubrel_packet< PacketIdBytes > Class Template Reference

MQTT PUBREL packet (v5) More...

#include <v5_pubrel.hpp>

Public Member Functions

 basic_pubrel_packet (packet_id_t packet_id, pubrel_reason_code reason_code, properties props)
 constructor
 
 basic_pubrel_packet (packet_id_t packet_id)
 constructor
 
 basic_pubrel_packet (packet_id_t packet_id, pubrel_reason_code reason_code)
 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.
 
constexpr std::size_t num_of_const_buffer_sequence () const
 Get number of element of const_buffer_sequence.
 
packet_id_t packet_id () const
 Get packet_id.
 
pubrel_reason_code code () const
 
properties constprops () const
 

Detailed Description

template<std::size_t PacketIdBytes>
class async_mqtt::v5::basic_pubrel_packet< PacketIdBytes >

MQTT PUBREL packet (v5)

Template Parameters
PacketIdBytessize of packet_id

If basic_endpoint::set_auto_pub_response() is called with true, then this packet is automatically sent when PUBREC v5::basic_pubrec_packet is received. If both the client and the broker keeping the session, this packet is stored in the endpoint for resending if disconnect/reconnect happens. If the session doesn' exist or lost, then the stored packets are erased.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901141

Constructor & Destructor Documentation

◆ basic_pubrel_packet() [1/3]

template<std::size_t PacketIdBytes>
async_mqtt::v5::basic_pubrel_packet< PacketIdBytes >::basic_pubrel_packet ( packet_id_t packet_id,
pubrel_reason_code reason_code,
properties props )
inline

constructor

Parameters
packet_idMQTT PacketIdentifier that is corresponding to the PUBREC packet
reason_codePubrelReasonCode
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901144
propsproperties.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901145

◆ basic_pubrel_packet() [2/3]

template<std::size_t PacketIdBytes>
async_mqtt::v5::basic_pubrel_packet< PacketIdBytes >::basic_pubrel_packet ( packet_id_t packet_id)
inline

constructor

Parameters
packet_idMQTT PacketIdentifier that is corresponding to the PUBREC packet

◆ basic_pubrel_packet() [3/3]

template<std::size_t PacketIdBytes>
async_mqtt::v5::basic_pubrel_packet< PacketIdBytes >::basic_pubrel_packet ( packet_id_t packet_id,
pubrel_reason_code reason_code )
inline

constructor

Parameters
packet_idMQTT PacketIdentifier that is corresponding to the PUBREC packet
reason_codePubrelReasonCode
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901144

Member Function Documentation

◆ code()

template<std::size_t PacketIdBytes>
pubrel_reason_code async_mqtt::v5::basic_pubrel_packet< PacketIdBytes >::code ( ) const
inline

@breif Get reason code

Returns
reason_code

◆ const_buffer_sequence()

template<std::size_t PacketIdBytes>
std::vector< as::const_buffer > async_mqtt::v5::basic_pubrel_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>
constexpr std::size_t async_mqtt::v5::basic_pubrel_packet< PacketIdBytes >::num_of_const_buffer_sequence ( ) const
inlineconstexpr

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::v5::basic_pubrel_packet< PacketIdBytes >::packet_id ( ) const
inline

Get packet_id.

Returns
packet_id

◆ props()

template<std::size_t PacketIdBytes>
properties const & async_mqtt::v5::basic_pubrel_packet< PacketIdBytes >::props ( ) const
inline

@breif Get properties

Returns
properties

◆ size()

template<std::size_t PacketIdBytes>
std::size_t async_mqtt::v5::basic_pubrel_packet< PacketIdBytes >::size ( ) const
inline

Get packet size.

Returns
packet size

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