async_mqtt 5.0.0
|
MQTT CONNECT packet (v5) More...
#include <v5_connect.hpp>
Public Member Functions | |
connect_packet (bool clean_start, std::uint16_t keep_alive_sec, buffer client_id, optional< buffer > user_name=nullopt, optional< buffer > password=nullopt, properties props={}) | |
connect_packet (bool clean_start, std::uint16_t keep_alive_sec, buffer client_id, optional< will > w, optional< buffer > user_name=nullopt, optional< buffer > password=nullopt, properties props={}) | |
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. | |
bool | clean_start () const |
Get clean_start. | |
std::uint16_t | keep_alive () const |
Get keep_alive. | |
buffer | client_id () const |
Get client_id. | |
optional< buffer > | user_name () const |
Get user_name. | |
optional< buffer > | password () const |
Get password. | |
optional< will > | get_will () const |
Get will. | |
properties const & | props () const |
MQTT CONNECT packet (v5)
Only MQTT client can send this packet.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901033
|
inline |
@bried constructor
clean_start | When the endpoint sends CONNECT packet with clean_start is true, then stored packets are erased. When the endpoint receives CONNECT packet with clean_start is false, then the endpoint start storing PUBLISH packet (QoS1 and QoS2) and PUBREL packet that would send by the endpoint until the corresponding response would be received. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901039 |
keep_alive_sec | When the endpoint sends CONNECT packet with keep_alive_sec, then the endpoint start sending PINGREQ packet keep_alive_sec after the last packet is sent. When the endpoint receives CONNECT packet with keep_alive_sec, then start keep_alive_sec * 1.5 timer. The timer is reset if any packet is received. If the timer is fired, then the endpoint close the underlying layer automatically. At that time, if the endpoint recv() is called, then the CompletionToken is invoked with system_error. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901045 |
client_id | MQTT ClientIdentifier. It is the request to the broker for generating ClientIdentifier if it is empty string. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901059 |
user_name | MQTT UserName. It is often used for authentication. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901071 |
password | MQTT Password. It is often used for authentication. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901072 |
|
inline |
@bried constructor
clean_start | When the endpoint sends CONNECT packet with clean_start is true, then stored packets are erased. When the endpoint receives CONNECT packet with clean_start is false, then the endpoint start storing PUBLISH packet (QoS1 and QoS2) and PUBREL packet that would send by the endpoint until the corresponding response would be received. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901039 |
keep_alive_sec | When the endpoint sends CONNECT packet with keep_alive_sec, then the endpoint start sending PINGREQ packet keep_alive_sec after the last packet is sent. When the endpoint receives CONNECT packet with keep_alive_sec, then start keep_alive_sec * 1.5 timer. The timer is reset if any packet is received. If the timer is fired, then the endpoint close the underlying layer automatically. At that time, if the endpoint recv() is called, then the CompletionToken is invoked with system_error. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901045 |
client_id | MQTT ClientIdentifier. It is the request to the broker for generating ClientIdentifier if it is empty string. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901059 |
will | MQTT Will See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901060 |
user_name | MQTT UserName. It is often used for authentication. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901071 |
password | MQTT Password. It is often used for authentication. See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901072 |
|
inline |
Get clean_start.
|
inline |
Get client_id.
|
inline |
Create const buffer sequence it is for boost asio APIs.
|
inline |
Get will.
|
inline |
Get keep_alive.
|
inline |
Get number of element of const_buffer_sequence.
|
inline |
Get password.
|
inline |
@breif Get properties
|
inline |
Get packet size.
|
inline |
Get user_name.