diff options
author | cbdev <cb@cbcdn.com> | 2020-12-05 14:27:23 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-12-05 14:27:23 +0100 |
commit | fdb0bf2e86693f99550f6e21de85023188ac5b03 (patch) | |
tree | 8c41a2ef8cd1ec7098beec9b312ad1289405f877 /backends/mqtt.h | |
parent | a59c42e5caa76a5ea1d5e79b7820a1a012f9a3a4 (diff) | |
download | midimonster-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.h | 5 |
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 |