User Manual

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 ( IPAddress ip, uint16_t port = 8883, bool cleanSession = true, uint16_t
keepalive_sec = MQTT_KEEPALIVE_DEFAULT)
Establishes a secure connection with the specified MQTT broker.
Parameters:
ip: The IP address of the MQTT broker
port: The port to use (default = 8883)
cleanSession: Indicates whether the client and broker should remember 'state' across restarts and reconnects
(based on the 'Client ID' value set in the constructor):
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 ( const char* host, uint16_t port = 8883, bool cleanSession = true, uint16_t
keepalive_sec = MQTT_KEEPALIVE_DEFAULT)
Establishes a secure connection with the specified MQTT broker.
Parameters:
host: The domain name of the MQTT broker
port: The port to use (default = 8883)
cleanSession: Indicates whether the client and broker should remember 'state' across restarts and reconnects
(based on the 'Client ID' value set in the constructor):
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 112 of 202