libmqtt/src/mqtt_internal.h
Johannes Schriewer 1981e1a104 Implement keepalive
currently relatively dumb, as the timer does not get reset when
a regular packet is sent.

Re #9
2018-08-03 18:42:48 +02:00

34 lines
631 B
C

#ifndef mqtt_internal_h__included
#define mqtt_internal_h__included
#include "mqtt.h"
#include "packet.h"
#include "subscriptions.h"
#include "state_queue.h"
typedef struct _PlatformData PlatformData;
struct _MQTTHandle {
MQTTConfig *config;
MQTTErrorHandler error_handler;
Subscriptions subscriptions;
bool reader_alive;
int read_task_handle;
uint16_t packet_id_counter;
MQTTCallbackQueue queue;
PlatformData *platform;
int keepalive_timer;
};
void mqtt_free(MQTTHandle *handle);
#ifndef KEEPALIVE_INTERVAL
#define KEEPALIVE_INTERVAL 60
#endif
#endif /* mqtt_internal_h__included */