User Manual

MQTT_KEEPALIVE_DEFAULT)
This function will attempt to connect to the Adafruit IO servers using a standard (unencrypted) connection.
Parameters:
cleanSession: Indicates whether the client and broker should remember 'state' across restarts and reconnects.
'State' maintenance is based on the Client ID so be sure to set a reusable value via .clientID if you set
cleanSession to false!:
If set to false (0) both the client and server will maintain state across restarts of the client, the server and the
connection. As state is maintained:
Message delivery will be reliable meeting the specified QOS even if the client, server or connection
are restarted.
The server will treat a subscription as durable.
If set to true (1) the client and server will not maintain state across restarts of the client, the server or the
connection. This means:
Message delivery to the specified QOS cannot be maintained if the client, server or connection are
restarted
The server will treat a subscription as non-durable
keepalive_sec: This value defines the maximum interval (in seconds) between messages being sent or received.
Setting a value here ensures that at least one message is sent between the client and the broker within every
'keep alive' period. If no data was sent within 'keepalive_sec' seconds, the Client will send a simple ping to the
broker to keep the connection alive. Setting this value to '0' disables the keep alive feature. The default value is
60 seconds.
Returns: 'True' (1) if the connection was successful, otherwise 'false' (0).
bool connectSSL (bool cleanSession = true, uint16_t keepalive_sec =
MQTT_KEEPALIVE_DEFAULT)
This function will attempt to connect to the Adafruit IO servers using a secure (TLS/SSL) connection.
Parameters:
cleanSession: Indicates whether the client and broker should remember 'state' across restarts and reconnects.
'State' maintenance is based on the Client ID so be sure to set a reusable value via .clientID if you set
cleanSession to false!:
If set to false (0) both the client and server will maintain state across restarts of the client, the server and the
connection. As state is maintained:
Message delivery will be reliable meeting the specified QOS even if the client, server or connection
are restarted.
The server will treat a subscription as durable.
If set to true (1) the client and server will not maintain state across restarts of the client, the server or the
connection. This means:
Message delivery to the specified QOS cannot be maintained if the client, server or connection are
restarted
The server will treat a subscription as non-durable
keepalive_sec: This value defines the maximum interval (in seconds) between messages being sent or received.
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 131 of 202