Loading...
Searching...
No Matches
mqtt::disconnect_options_builder Class Reference

`#include <disconnect_options.h>`

## Public Types

using | self = disconnect_options_builder

## Public Member Functions

| disconnect_options_builder ()
auto | properties (mqtt::properties &&props) -> self &
auto | properties (const mqtt::properties &props) -> self &
template<class Rep, class Period>
auto | timeout (const std::chrono::duration< Rep, Period > &to) -> self &
auto | reason_code (ReasonCode code) -> self &
disconnect_options | finalize ()

## Static Public Member Functions

static disconnect_options_builder | v3 ()
static disconnect_options_builder | v5 ()

## Detailed Description

Class to build connect options.

## Member Typedef Documentation

## self

using mqtt::disconnect_options_builder::self = disconnect_options_builder

This class

## Constructor & Destructor Documentation

## disconnect_options_builder()

mqtt::disconnect_options_builder::disconnect_options_builder | ( |  | ) |

inline

Default constructor.

## Member Function Documentation

## v3()

disconnect_options_builder mqtt::disconnect_options_builder::v3 | ( |  | ) |

inline static

Creates default options builder for an MQTT v3.x connection.

Returns
  Default options builder for an MQTT v3.x connection.

## v5()

disconnect_options_builder mqtt::disconnect_options_builder::v5 | ( |  | ) |

inline static

Creates default options builder for an MQTT v5 connection.

Returns
  Default options builder for an MQTT v5 connection.

## properties() [1/2]

auto mqtt::disconnect_options_builder::properties | ( | mqtt::properties && | props | ) | ->self &

inline

Sets the properties for the disconnect message.

Parameters

  props | The properties for the disconnect message.

## properties() [2/2]

auto mqtt::disconnect_options_builder::properties | ( | const mqtt::properties & | props | ) | ->self &

inline

Sets the properties for the disconnect message.

Parameters

  props | The properties for the disconnect message.

## timeout()

template<class Rep, class Period>

auto mqtt::disconnect_options_builder::timeout | ( | const std::chrono::duration< Rep, Period > & | to | ) | ->self &

inline

Sets the disconnect connect timeout. This allows for any remaining in-flight messages to be delivered.

Parameters

  to | The disconnect timeout.

## reason_code()

auto mqtt::disconnect_options_builder::reason_code | ( | ReasonCode | code | ) | ->self &

inline

Sets the reason code for the disconnect.

Parameters

  code | The reason code for the disconnect.

## finalize()

disconnect_options mqtt::disconnect_options_builder::finalize | ( |  | ) |

inline

Finish building the options and return them.

Returns
  The option struct as built.

The documentation for this class was generated from the following file:

- disconnect_options.h