Public Attributes | List of all members
MQTTAsync_connectOptions Struct Reference

#include <MQTTAsync.h>

Public Attributes

int automaticReconnect
 
struct {
   const void *   data
 
   int   len
 
binarypwd
 
int cleansession
 
int cleanstart
 
MQTTPropertiesconnectProperties
 
int connectTimeout
 
void * context
 
const MQTTAsync_nameValuehttpHeaders
 
int keepAliveInterval
 
int maxInflight
 
int maxRetryInterval
 
int minRetryInterval
 
int MQTTVersion
 
MQTTAsync_onFailureonFailure
 
MQTTAsync_onFailure5onFailure5
 
MQTTAsync_onSuccessonSuccess
 
MQTTAsync_onSuccess5onSuccess5
 
const char * password
 
int retryInterval
 
int serverURIcount
 
char *const * serverURIs
 
MQTTAsync_SSLOptionsssl
 
char struct_id [4]
 
int struct_version
 
const char * username
 
MQTTAsync_willOptionswill
 
MQTTPropertieswillProperties
 

Detailed Description

MQTTAsync_connectOptions defines several settings that control the way the client connects to an MQTT server. Default values are set in MQTTAsync_connectOptions_initializer.

Definition at line 1158 of file MQTTAsync.h.

Member Data Documentation

int MQTTAsync_connectOptions::automaticReconnect

Reconnect automatically in the case of a connection being lost?

Definition at line 1288 of file MQTTAsync.h.

struct { ... } MQTTAsync_connectOptions::binarypwd

Optional binary password. Only checked and used if the password option is NULL

int MQTTAsync_connectOptions::cleansession

This is a boolean value. The cleansession setting controls the behaviour of both the client and the server at connection and disconnection time. The client and server both maintain session state information. This information is used to ensure "at least once" and "exactly once" delivery, and "exactly once" receipt of messages. Session state also includes subscriptions created by an MQTT client. You can choose to maintain or discard state information between sessions.

When cleansession is true, the state information is discarded at connect and disconnect. Setting cleansession to false keeps the state information. When you connect an MQTT client application with MQTTAsync_connect(), the client identifies the connection using the client identifier and the address of the server. The server checks whether session information for this client has been saved from a previous connection to the server. If a previous session still exists, and cleansession=true, then the previous session information at the client and server is cleared. If cleansession=false, the previous session is resumed. If no previous session exists, a new session is started.

Definition at line 1204 of file MQTTAsync.h.

int MQTTAsync_connectOptions::cleanstart

Definition at line 1307 of file MQTTAsync.h.

MQTTProperties* MQTTAsync_connectOptions::connectProperties

MQTT V5 properties for connect

Definition at line 1311 of file MQTTAsync.h.

int MQTTAsync_connectOptions::connectTimeout

The time interval in seconds to allow a connect to complete.

Definition at line 1230 of file MQTTAsync.h.

void* MQTTAsync_connectOptions::context

A pointer to any application-specific context. The the context pointer is passed to success or failure callback functions to provide access to the context information in the callback.

Definition at line 1261 of file MQTTAsync.h.

const void* MQTTAsync_connectOptions::data

binary password data

Definition at line 1302 of file MQTTAsync.h.

const MQTTAsync_nameValue* MQTTAsync_connectOptions::httpHeaders

httpHeaders

Definition at line 1331 of file MQTTAsync.h.

int MQTTAsync_connectOptions::keepAliveInterval

The "keep alive" interval, measured in seconds, defines the maximum time that should pass without communication between the client and the server The client will ensure that at least one message travels across the network within each keep alive period. In the absence of a data-related message during the time period, the client sends a very small MQTT "ping" message, which the server will acknowledge. The keep alive interval enables the client to detect when the server is no longer available without having to wait for the long TCP/IP timeout. Set to 0 if you do not want any keep alive processing.

Definition at line 1182 of file MQTTAsync.h.

int MQTTAsync_connectOptions::len

binary password length

Definition at line 1301 of file MQTTAsync.h.

int MQTTAsync_connectOptions::maxInflight

This controls how many messages can be in-flight simultaneously.

Definition at line 1208 of file MQTTAsync.h.

int MQTTAsync_connectOptions::maxRetryInterval

Maximum retry interval in seconds. The doubling stops here on failed retries.

Definition at line 1296 of file MQTTAsync.h.

int MQTTAsync_connectOptions::minRetryInterval

Minimum retry interval in seconds. Doubled on each failed retry.

Definition at line 1292 of file MQTTAsync.h.

int MQTTAsync_connectOptions::MQTTVersion

Sets the version of MQTT to be used on the connect. MQTTVERSION_DEFAULT (0) = default: start with 3.1.1, and if that fails, fall back to 3.1 MQTTVERSION_3_1 (3) = only try version 3.1 MQTTVERSION_3_1_1 (4) = only try version 3.1.1

Definition at line 1284 of file MQTTAsync.h.

MQTTAsync_onFailure* MQTTAsync_connectOptions::onFailure

A pointer to a callback function to be called if the connect fails. Can be set to NULL, in which case no indication of unsuccessful completion will be received.

Definition at line 1255 of file MQTTAsync.h.

MQTTAsync_onFailure5* MQTTAsync_connectOptions::onFailure5

A pointer to a callback function to be called if the connect fails. Can be set to NULL, in which case no indication of unsuccessful completion will be received.

Definition at line 1327 of file MQTTAsync.h.

MQTTAsync_onSuccess* MQTTAsync_connectOptions::onSuccess

A pointer to a callback function to be called if the connect successfully completes. Can be set to NULL, in which case no indication of successful completion will be received.

Definition at line 1249 of file MQTTAsync.h.

MQTTAsync_onSuccess5* MQTTAsync_connectOptions::onSuccess5

A pointer to a callback function to be called if the connect successfully completes. Can be set to NULL, in which case no indication of successful completion will be received.

Definition at line 1321 of file MQTTAsync.h.

const char* MQTTAsync_connectOptions::password

MQTT servers that support the MQTT v3.1 protocol provide authentication and authorisation by user name and password. This is the password parameter.

Definition at line 1226 of file MQTTAsync.h.

int MQTTAsync_connectOptions::retryInterval

The time interval in seconds after which unacknowledged publish requests are retried during a TCP session. With MQTT 3.1.1 and later, retries are not required except on reconnect. 0 turns off in-session retries, and is the recommended setting. Adding retries to an already overloaded network only exacerbates the problem.

Definition at line 1238 of file MQTTAsync.h.

int MQTTAsync_connectOptions::serverURIcount

The number of entries in the serverURIs array.

Definition at line 1265 of file MQTTAsync.h.

char* const* MQTTAsync_connectOptions::serverURIs

An array of null-terminated strings specifying the servers to which the client will connect. Each string takes the form protocol://host:port. protocol must be tcp, ssl, ws or wss. The TLS enabled prefixes (ssl, wss) are only valid if a TLS version of the library is linked with. For host, you can specify either an IP address or a domain name. For instance, to connect to a server running on the local machines with the default MQTT port, specify tcp://localhost:1883.

Definition at line 1277 of file MQTTAsync.h.

MQTTAsync_SSLOptions* MQTTAsync_connectOptions::ssl

This is a pointer to an MQTTAsync_SSLOptions structure. If your application does not make use of SSL, set this pointer to NULL.

Definition at line 1243 of file MQTTAsync.h.

char MQTTAsync_connectOptions::struct_id[4]

The eyecatcher for this structure. must be MQTC.

Definition at line 1161 of file MQTTAsync.h.

int MQTTAsync_connectOptions::struct_version

The version number of this structure. Must be 0, 1, 2, 3 4 5 6 or 7. 0 signifies no SSL options and no serverURIs 1 signifies no serverURIs 2 signifies no MQTTVersion 3 signifies no automatic reconnect options 4 signifies no binary password option (just string) 5 signifies no MQTTV5 properties 6 signifies no HTTP headers option

Definition at line 1171 of file MQTTAsync.h.

const char* MQTTAsync_connectOptions::username

MQTT servers that support the MQTT v3.1 protocol provide authentication and authorisation by user name and password. This is the user name parameter.

Definition at line 1220 of file MQTTAsync.h.

MQTTAsync_willOptions* MQTTAsync_connectOptions::will

This is a pointer to an MQTTAsync_willOptions structure. If your application does not make use of the Last Will and Testament feature, set this pointer to NULL.

Definition at line 1214 of file MQTTAsync.h.

MQTTProperties* MQTTAsync_connectOptions::willProperties

MQTT V5 properties for the will message in the connect

Definition at line 1315 of file MQTTAsync.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49