async_mqtt 9.0.1
Loading...
Searching...
No Matches
async_mqtt::v3_1_1::pingresp_packet Class Reference

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

#include <v3_1_1_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 control_packet_type type ()
 Get MQTT control packet type.
 
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.)

bool operator< (pingresp_packet const &lhs, pingresp_packet const &rhs)
 less than operator
 
bool operator== (pingresp_packet const &lhs, pingresp_packet const &rhs)
 equal operator
 
std::ostream & operator<< (std::ostream &o, pingresp_packet const &v)
 stream output operator
 

Detailed Description

MQTT PINGRESP packet (v3.1.1)

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 v3_1_1::pingreq_packet is received. If the endpoint called basic_endpoint::set_pingresp_recv_timeout() with non 0 argument, and PINGRESP packet isn't received until the timer fired, then the underlying layer is closed from the client side.
See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718086

Thread Safety

  • Distinct objects: Safe
  • Shared objects: Unsafe

Requirements

Member Function Documentation

◆ const_buffer_sequence()

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

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::v3_1_1::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::v3_1_1::pingresp_packet::size ( ) const

Get packet size.

Returns
packet size

◆ type()

static constexpr control_packet_type async_mqtt::v3_1_1::pingresp_packet::type ( )
inlinestaticconstexpr

Get MQTT control packet type.

Returns
control packet type

Friends And Related Symbol Documentation

◆ operator<()

bool operator< ( pingresp_packet const & lhs,
pingresp_packet const & rhs )
related

less than operator

Parameters
lhscompare target
rhscompare target
Returns
true if the lhs less than the rhs, otherwise false.

Requirements

◆ operator<<()

std::ostream & operator<< ( std::ostream & o,
pingresp_packet const & v )
related

stream output operator

Parameters
ooutput stream
vtarget
Returns
output stream

Requirements

◆ operator==()

bool operator== ( pingresp_packet const & lhs,
pingresp_packet const & rhs )
related

equal operator

Parameters
lhscompare target
rhscompare target
Returns
true if the lhs equal to the rhs, otherwise false.

Requirements


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