mqtt: Allow client to override keepalive
This change will allow an MQTT client to override the compile-time keepalive if desired. The change is structured such that the compile-time default will still be setup by calling mqtt_client_init, but can be changed by the application before calling mqtt_connect if desired. Signed-off-by: Justin Brzozoski <justin.brzozoski@signal-fire.com>
This commit is contained in:
parent
fb898e3532
commit
ffe25df82a
3 changed files with 10 additions and 4 deletions
|
@ -476,6 +476,11 @@ struct mqtt_client {
|
|||
/** Size of transmit buffer. */
|
||||
u32_t tx_buf_size;
|
||||
|
||||
/** Keepalive interval for this client in seconds.
|
||||
* Default is CONFIG_MQTT_KEEPALIVE.
|
||||
*/
|
||||
u16_t keepalive;
|
||||
|
||||
/** MQTT protocol version. */
|
||||
u8_t protocol_version;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue