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

`#include <connect_options.h>`

## Public Member Functions

| connect_data ()
| connect_data (string_ref userName)
| connect_data (string_ref userName, binary_ref password)
| connect_data (const connect_data &other)
connect_data & | operator= (const connect_data &rhs)
string | get_user_name () const
binary_ref | get_password () const
void | set_user_name (string_ref userName)
void | set_password (binary_ref password)

## Friends

class | async_client

## Detailed Description

The connect options that can be updated before an automatic reconnect.

## Constructor & Destructor Documentation

## connect_data() [1/4]

mqtt::connect_data::connect_data | ( |  | ) |

Creates an empty set of connection data.

## connect_data() [2/4]

mqtt::connect_data::connect_data | ( | string_ref | userName | ) |

explicit

Creates connection data with a user name, but no password.

Parameters

  userName | The user name for reconnecting to the MQTT broker.

## connect_data() [3/4]

mqtt::connect_data::connect_data | ( | string_ref | userName,
|  | binary_ref | password
| ) |  |

Creates connection data with a user name and password.

Parameters

  userName | The user name for reconnecting to the MQTT broker.
  password | The password for connecting to the MQTT broker.

## connect_data() [4/4]

mqtt::connect_data::connect_data | ( | const connect_data & | other | ) |

Copy constructor

Parameters

  other | Another data struct to copy into this one.

## Member Function Documentation

## operator=()

connect_data & mqtt::connect_data::operator= | ( | const connect_data & | rhs | ) |

Copy the connection data.

Parameters

  rhs | Another data struct to copy into this one.

Returns
  A reference to this data

## get_user_name()

string mqtt::connect_data::get_user_name | ( |  | ) | const

inline

Gets the user name to use for the connection.

Returns
  The user name to use for the connection.

## get_password()

binary_ref mqtt::connect_data::get_password | ( |  | ) | const

inline

Gets the password to use for the connection.

Returns
  The password to use for the connection.

## set_user_name()

void mqtt::connect_data::set_user_name | ( | string_ref | userName | ) |

Sets the user name to use for the connection.

Parameters

  userName | The user name for connecting to the MQTT broker.

## set_password()

void mqtt::connect_data::set_password | ( | binary_ref | password | ) |

Sets the password to use for the connection.

Parameters

  password | The password for connecting to the MQTT broker.

## Friends And Related Symbol Documentation

## async_client

friend class async_client

friend

The client has special access

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

- connect_options.h