aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/mqtt.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-12-05 14:27:23 +0100
committercbdev <cb@cbcdn.com>2020-12-05 14:27:23 +0100
commitfdb0bf2e86693f99550f6e21de85023188ac5b03 (patch)
tree8c41a2ef8cd1ec7098beec9b312ad1289405f877 /backends/mqtt.h
parenta59c42e5caa76a5ea1d5e79b7820a1a012f9a3a4 (diff)
downloadmidimonster-fdb0bf2e86693f99550f6e21de85023188ac5b03.tar.gz
midimonster-fdb0bf2e86693f99550f6e21de85023188ac5b03.tar.bz2
midimonster-fdb0bf2e86693f99550f6e21de85023188ac5b03.zip
Implement basic MQTT connection startup
Diffstat (limited to 'backends/mqtt.h')
-rw-r--r--backends/mqtt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/mqtt.h b/backends/mqtt.h
index 165f2ba..1c8b47d 100644
--- a/backends/mqtt.h
+++ b/backends/mqtt.h
@@ -12,6 +12,8 @@ static int mqtt_shutdown(size_t n, instance** inst);
#define MQTT_PORT "1883"
#define MQTT_TLS_PORT "8883"
+#define MQTT_BUFFER_LENGTH 8192
+#define MQTT_KEEPALIVE 10
enum {
MSG_RESERVED = 0x00,
@@ -39,9 +41,12 @@ typedef struct /*_mqtt_instance_data*/ {
char* user;
char* password;
+ char* client_id;
size_t nchannels;
char** channel;
+
+ int fd;
} mqtt_instance_data;
//per-channel