async_mqtt 5.0.0
Loading...
Searching...
No Matches
async_mqtt::v3_1_1::connack_packet Class Reference

#include <v3_1_1_connack.hpp>

Public Member Functions

 connack_packet (bool session_present, connect_return_code return_code)
 
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.
 
bool session_present () const
 Get session_present.
 
connect_return_code code () const
 Get connect_return_code.
 

Static Public Member Functions

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

Detailed Description

@bried MQTT CONNACK packet (v3.1.1)

Only MQTT broker(sever) can send this packet.
See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718033

Constructor & Destructor Documentation

◆ connack_packet()

async_mqtt::v3_1_1::connack_packet::connack_packet ( bool session_present,
connect_return_code return_code )
inline

@bried constructor

Parameters
session_presentIf the broker stores the session, then true, otherwise false. When the endpoint receives CONNACK packet with session_present is false, then stored packets are erased.
return_codeConnectReturnCode See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc385349256

Member Function Documentation

◆ code()

connect_return_code async_mqtt::v3_1_1::connack_packet::code ( ) const
inline

Get connect_return_code.

Returns
connect_return_code

◆ const_buffer_sequence()

std::vector< as::const_buffer > async_mqtt::v3_1_1::connack_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::v3_1_1::connack_packet::num_of_const_buffer_sequence ( )
inlinestaticconstexpr

Get number of element of const_buffer_sequence.

Returns
number of element of const_buffer_sequence

◆ session_present()

bool async_mqtt::v3_1_1::connack_packet::session_present ( ) const
inline

Get session_present.

Returns
session_present

◆ size()

std::size_t async_mqtt::v3_1_1::connack_packet::size ( ) const
inline

Get packet size.

Returns
packet size

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