async_mqtt 5.0.0
Loading...
Searching...
No Matches
async_mqtt::v5::pingresp_packet Class Reference

MQTT PINGRESP packet (v5) More...

#include <v5_pingresp.hpp>

Public Member Functions

 pingresp_packet ()
 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.
 

Static Public Member Functions

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

Detailed Description

MQTT PINGRESP packet (v5)

Only MQTT broker(sever) can send this packet. If basic_endpoint::set_auto_ping_response() is called with true, then this packet is automatically sent when PINGREQ v5::pingreq_packet is received. If the endpoint called basic_endpoint::set_pingresp_recv_timeout_ms() with non 0 argument, and PINGRESP packet isn't received until the timer fired, then send DISCONNECT packet with the reason code disconnect_reason_code::keep_alive_timeout automatically then close underlying layer automatically.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901200

Member Function Documentation

◆ const_buffer_sequence()

std::vector< as::const_buffer > async_mqtt::v5::pingresp_packet::const_buffer_sequence ( ) const
inline

Create const buffer sequence it is for boost asio APIs.

Returns
const buffer sequence

◆ num_of_const_buffer_sequence()

static constexpr std::size_t async_mqtt::v5::pingresp_packet::num_of_const_buffer_sequence ( )
inlinestaticconstexpr

Get number of element of const_buffer_sequence.

Returns
number of element of const_buffer_sequence

◆ size()

std::size_t async_mqtt::v5::pingresp_packet::size ( ) const
inline

Get packet size.

Returns
packet size

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