![]() |
paho-mqtt-cpp
MQTT C++ Client for POSIX and Windows
|
#include <disconnect_options.h>
Public Member Functions | |
disconnect_options () | |
disconnect_options (int timeout) | |
template<class Rep , class Period > | |
disconnect_options (const std::chrono::duration< Rep, Period > &to) | |
disconnect_options (const disconnect_options &opt) | |
disconnect_options (disconnect_options &&opt) | |
disconnect_options & | operator= (const disconnect_options &opt) |
disconnect_options & | operator= (disconnect_options &&opt) |
std::chrono::milliseconds | get_timeout () const |
void | set_timeout (int timeout) |
template<class Rep , class Period > | |
void | set_timeout (const std::chrono::duration< Rep, Period > &to) |
void | set_token (const token_ptr &tok, int mqttVersion) |
token_ptr | get_token () const |
const properties & | get_properties () const |
properties & | get_properties () |
void | set_properties (const properties &props) |
void | set_properties (properties &&props) |
ReasonCode | get_reason_code () const |
void | set_reason_code (ReasonCode code) |
Static Public Member Functions | |
static disconnect_options | v3 () |
static disconnect_options | v5 () |
Friends | |
class | async_client |
class | disconnect_options_builder |
Options for disconnecting from an MQTT broker.
mqtt::disconnect_options::disconnect_options | ( | ) |
Create an empty delivery response object.
|
inline |
Creates disconnect options tied to the specific token.
timeout | The timeout (in milliseconds). |
|
inline |
Creates disconnect options tied to the specific token.
to | The timeout. |
mqtt::disconnect_options::disconnect_options | ( | const disconnect_options & | opt | ) |
Copy constructor.
opt | Another object to copy. |
mqtt::disconnect_options::disconnect_options | ( | disconnect_options && | opt | ) |
Move constructor.
opt | Another object to move into this new one. |
|
static |
Creates default options for an MQTT v3.x connection.
|
static |
Creates default options for an MQTT v5 connection.
disconnect_options & mqtt::disconnect_options::operator= | ( | const disconnect_options & | opt | ) |
Copy assignment.
opt | Another object to copy. |
disconnect_options & mqtt::disconnect_options::operator= | ( | disconnect_options && | opt | ) |
Move assignment.
opt | Another object to move into this new one. |
|
inline |
Expose the underlying C struct for the unit tests. Gets the timeout used for disconnecting.
|
inline |
Sets the disconnect timeout, in milliseconds. This allows for any remaining in-flight messages to be delivered.
timeout | The disconnect timeout (in milliseconds). |
|
inline |
Sets the disconnect timeout with a duration. This allows for any remaining in-flight messages to be delivered.
to | The disconnect connect timeout. |
void mqtt::disconnect_options::set_token | ( | const token_ptr & | tok, |
int | mqttVersion ) |
Sets the callback context to a delivery token.
tok | The delivery token to be used as the callback context. |
mqttVersion | The version of MQTT we're using for the connection. |
|
inline |
Gets the callback context to a delivery token.
|
inline |
Gets the disconnect properties.
|
inline |
Gets a mutable reference to the disconnect properties.
|
inline |
Sets the properties for the connect.
props | The properties to place into the message. |
|
inline |
Moves the properties for the connect.
props | The properties to move into the connect object. |
|
inline |
Gets the reason code for the disconnect.
|
inline |
Sets the reason code for the disconnect.
code | The reason code for the disconnect. |
|
friend |
The client has special access
|
friend |
The options builder has special access