async_mqtt 9.0.1
|
MQTT DISCONNECT packet (v5) More...
#include <v5_disconnect.hpp>
Public Member Functions | |
disconnect_packet (disconnect_reason_code reason_code, properties props) | |
constructor | |
disconnect_packet () | |
constructor | |
disconnect_packet (disconnect_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. | |
std::size_t | num_of_const_buffer_sequence () const |
Get number of element of const_buffer_sequence. | |
disconnect_reason_code | code () const |
Get reason code. | |
properties const & | props () const |
Get properties. | |
Static Public Member Functions | |
static constexpr control_packet_type | type () |
Get MQTT control packet type. | |
Friends | |
std::ostream & | operator<< (std::ostream &o, disconnect_packet const &v) |
stream output operator | |
Related Symbols | |
(Note that these are not member symbols.) | |
bool | operator< (disconnect_packet const &lhs, disconnect_packet const &rhs) |
less than operator | |
bool | operator== (disconnect_packet const &lhs, disconnect_packet const &rhs) |
equal operator | |
MQTT DISCONNECT packet (v5)
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 except reason_code is Disconnect with Will Message.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901205
|
explicit |
constructor
reason_code | DisonnectReasonCode See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901208 |
props | properties. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901209 |
|
explicit |
constructor
reason_code | DisonnectReasonCode See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901208 |
disconnect_reason_code async_mqtt::v5::disconnect_packet::code | ( | ) | const |
Get reason code.
std::vector< as::const_buffer > async_mqtt::v5::disconnect_packet::const_buffer_sequence | ( | ) | const |
Create const buffer sequence it is for boost asio APIs.
std::size_t async_mqtt::v5::disconnect_packet::num_of_const_buffer_sequence | ( | ) | const |
Get number of element of const_buffer_sequence.
properties const & async_mqtt::v5::disconnect_packet::props | ( | ) | const |
Get properties.
std::size_t async_mqtt::v5::disconnect_packet::size | ( | ) | const |
Get packet size.
|
inlinestaticconstexpr |
Get MQTT control packet type.
|
related |
less than operator
lhs | compare target |
rhs | compare target |
|
friend |
stream output operator
o | output stream |
v | target |
|
related |
equal operator
lhs | compare target |
rhs | compare target |