23 #ifndef __mqtt_disconnect_options_h
24 #define __mqtt_disconnect_options_h
26 #include "MQTTAsync.h"
40 static const MQTTAsync_disconnectOptions DFLT_C_STRUCT;
43 MQTTAsync_disconnectOptions opts_;
50 friend class disconnect_options_test;
68 template <
class Rep,
class Period>
99 return std::chrono::milliseconds(opts_.timeout);
113 template <
class Rep,
class Period>
134 #endif // __mqtt_disconnect_options_h
Lightweight client for talking to an MQTT server using non-blocking methods that allow an operation t...
Definition: async_client.h:60
disconnect_options(const std::chrono::duration< Rep, Period > &to, const token_ptr &tok)
Creates disconnect options tied to the specific token.
Definition: disconnect_options.h:69
void set_timeout(int timeout)
Sets the timeout for disconnecting.
Definition: disconnect_options.h:106
std::chrono::milliseconds get_timeout() const
Gets the timeout used for disconnecting.
Definition: disconnect_options.h:98
void set_token(const token_ptr &tok)
Sets the callback context to a delivery token.
void set_timeout(const std::chrono::duration< Rep, Period > &to)
Sets the connect timeout with a chrono duration.
Definition: disconnect_options.h:114
token_ptr get_token() const
Gets the callback context to a delivery token.
Definition: disconnect_options.h:127
Options for disconnecting from an MQTT broker.
Definition: disconnect_options.h:37
disconnect_options()
Create an empty delivery response object.
Declaration of MQTT token class.
disconnect_options & operator=(const disconnect_options &opt)
Copy assignment.