![]() |
paho-mqtt-cpp
MQTT C++ Client for POSIX and Windows
|
#include <create_options.h>
Public Types | |
using | ptr_t = std::shared_ptr< create_options > |
using | const_ptr_t = std::shared_ptr< const create_options > |
Public Member Functions | |
create_options () | |
create_options (int mqttVersion) | |
create_options (int mqttVersion, int maxBufferedMessages) | |
bool | get_send_while_disconnected () const |
void | set_send_while_disconnected (bool on, bool anyTime=false) |
int | get_max_buffered_messages () const |
void | set_max_buffered_messages (int n) |
int | mqtt_version () const |
void | set_mqtt_version (int ver) |
bool | get_delete_oldest_messages () const |
void | set_delete_oldest_messages (bool on) |
bool | get_restore_messages () const |
void | set_restore_messages (bool on) |
bool | get_persist_qos0 () const |
void | set_persist_qos0 (bool on) |
Friends | |
class | async_client |
class | create_options_builder |
Options for creating a client object.
using mqtt::create_options::ptr_t = std::shared_ptr<create_options> |
Smart/shared pointer to an object of this class.
using mqtt::create_options::const_ptr_t = std::shared_ptr<const create_options> |
Smart/shared pointer to a const object of this class.
mqtt::create_options::create_options | ( | ) |
Default set of client create options.
|
explicit |
Default create options for the specified version of MQTT.
mqttVersion | The MQTT version used to create the client. |
mqtt::create_options::create_options | ( | int | mqttVersion, |
int | maxBufferedMessages | ||
) |
Default create options, but with off-line buffering enabled.
mqttVersion | The MQTT version used to create the client. |
maxBufferedMessages | the maximum number of messages allowed to be buffered while not connected |
|
inline |
Gets whether the client will accept message to publish while disconnected.
|
inline |
Sets whether the client will accept message to publish while disconnected.
on | true to allow the application to publish messages while disconnected, false returns an error on publish if disconnected. |
anyTime | If true, allows you to publish messages before the first successful connection. |
|
inline |
Gets the maximum number of offline buffered messages.
|
inline |
Sets the maximum number of offline buffered messages.
n | The maximum number of offline buffered messages. |
|
inline |
Gets the MQTT version used to create the client.
|
inline |
Sets the MQTT version used to create the client.
ver | The MQTT version used to create the client. |
|
inline |
Whether the oldest messages are deleted when the output buffer is full.
|
inline |
Determines what to do when the maximum number of buffered messages is reached: delete the oldest messages rather than the newest
on | true When the output queue is full, delete the oldest message, false drop the newest message being added. |
|
inline |
Whether the messages will be restored from persistence or the store will be cleared.
|
inline |
Determine whether to restore messages from persistence or clear the persistence store.
on | true to restore messages from persistence, false to clear the persistence store. |
|
inline |
Whether to persist QoS 0 messages.
|
inline |
Determine whether to persist QoS 0 messages.
on | true if QoS 0 messages are persisted, false if not. |
|
friend |
The client and tests have special access
|
friend |