Options for disconnecting from an MQTT broker.  
 More...
#include <disconnect_options.h>
|  | 
| class | async_client | 
|  | The client has special access. 
 | 
|  | 
| class | disconnect_options_test | 
|  | 
Options for disconnecting from an MQTT broker. 
      
        
          | mqtt::disconnect_options::disconnect_options | ( | int | timeout, | 
        
          |  |  | const token_ptr & | tok | 
        
          |  | ) |  |  | 
      
 
Creates disconnect options tied to the specific token. 
- Parameters
- 
  
    | timeout | The timeout (in milliseconds). |  | tok | A token to be used as the context. |  
 
 
 
template<class Rep , class Period > 
  
  | 
        
          | mqtt::disconnect_options::disconnect_options | ( | const std::chrono::duration< Rep, Period > & | to, |  
          |  |  | const token_ptr & | tok |  
          |  | ) |  |  |  | inline | 
 
Creates disconnect options tied to the specific token. 
- Parameters
- 
  
    | to | The timeout. |  | tok | A token to be used as the context. |  
 
 
 
Copy constructor. 
- Parameters
- 
  
    | opt | Another object to copy. |  
 
 
 
Move constructor. 
- Parameters
- 
  
    | opt | Another object to move into this new one. |  
 
 
 
  
  | 
        
          | std::chrono::milliseconds mqtt::disconnect_options::get_timeout | ( |  | ) | const |  | inline | 
 
Gets the timeout used for disconnecting. 
- Returns
- The timeout for disconnecting (in milliseconds). 
 
 
  
  | 
        
          | token_ptr mqtt::disconnect_options::get_token | ( |  | ) | const |  | inline | 
 
Gets the callback context to a delivery token. 
- Returns
- The delivery token to be used as the callback context. 
 
 
Copy assignment. 
- Parameters
- 
  
    | opt | Another object to copy. |  
 
 
 
Move assignment. 
- Parameters
- 
  
    | opt | Another object to move into this new one. |  
 
 
 
  
  | 
        
          | void mqtt::disconnect_options::set_timeout | ( | int | timeout | ) |  |  | inline | 
 
Sets the timeout for disconnecting. 
This allows for any remaining in-flight messages to be delivered. 
- Parameters
- 
  
    | timeout | The timeout (in milliseconds). |  
 
 
 
template<class Rep , class Period > 
  
  | 
        
          | void mqtt::disconnect_options::set_timeout | ( | const std::chrono::duration< Rep, Period > & | to | ) |  |  | inline | 
 
Sets the connect timeout with a chrono duration. 
This is the maximum time that the underlying library will wait for a connection before failing. 
- Parameters
- 
  
    | to | The connect timeout in seconds. |  
 
 
 
      
        
          | void mqtt::disconnect_options::set_token | ( | const token_ptr & | tok | ) |  | 
      
 
Sets the callback context to a delivery token. 
- Parameters
- 
  
    | tok | The delivery token to be used as the callback context. |  
 
 
 
The documentation for this class was generated from the following file: