Implement the subscriber client that optionally integrates
the TLS layer and can reconnect to the broker if the
application is running in unstable network environments.
The client is compliant with all 3 levels of QoS.
Signed-off-by: Mihai Pacuraru <mpacuraru@protonmail.com>
Modify the switch cases in parsearg function for QOS levels definition.
The comparison was made between a long value and a char.
Signed-off-by: Mihai Pacuraru <mpacuraru@protonmail.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
The mqttc demo under example path can not support mbedtls api.
Because of the MQTT-C source code already contains many types of
link examples, so we added the corresponding makefile to
support mbedtls mqttc connections publisher and posix mqttc
connections publisher and subscriber.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This patch will force wait for MQTT ACK (connection) and also
fix the issue caused by "strlen(mqtt_cfg.msg) + 1" that will
include the "\0" in the payload. It's forbidded by MQTT spec.
Some MQTT servers will ignore it, others like TagoIO will refuse
the packet.
commit 36d4bfa774 set a hostname to work
around getaddrinfo failing. getaddrinfo returns a non-zero value on
error, and there should be an early return after the error message is
printed.