From e248f0c5778f73988477ba73174c91b7085c232c Mon Sep 17 00:00:00 2001 From: cbdev Date: Fri, 18 Dec 2020 22:31:14 +0100 Subject: Implement MQTT connect --- backends/mqtt.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backends/mqtt.h') diff --git a/backends/mqtt.h b/backends/mqtt.h index 1c8b47d..df63319 100644 --- a/backends/mqtt.h +++ b/backends/mqtt.h @@ -14,6 +14,7 @@ static int mqtt_shutdown(size_t n, instance** inst); #define MQTT_TLS_PORT "8883" #define MQTT_BUFFER_LENGTH 8192 #define MQTT_KEEPALIVE 10 +#define MQTT_VERSION 0x05 enum { MSG_RESERVED = 0x00, @@ -47,6 +48,8 @@ typedef struct /*_mqtt_instance_data*/ { char** channel; int fd; + uint8_t receive_buffer[MQTT_BUFFER_LENGTH]; + size_t receive_offset; } mqtt_instance_data; //per-channel -- cgit v1.2.3