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

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

#include <v3_1_1_disconnect.hpp>

Public Member Functions

 disconnect_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 DISCONNECT packet (v3.1.1)

Only MQTT client can send this packet. When the endpoint sends DISCONNECT packet, then the endpoint become disconnecting status. The endpoint can't send packets any more. The underlying layer is not automatically closed from the client side. If you want to close the underlying layer from the client side, you need to call basic_endpoint::close() after sending DISCONNECT packet. When the broker receives DISCONNECT packet, then close underlying layer from the broker. In this case, Will is not published by the broker.
See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718090

Member Function Documentation

◆ const_buffer_sequence()

std::vector< as::const_buffer > async_mqtt::v3_1_1::disconnect_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::disconnect_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::disconnect_packet::size ( ) const
inline

Get packet size.

Returns
packet size

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