MQTT client on libmosquitto with its own thread (iteration 2, step 2)
MqttClient is the interface the HA layer will use; MosquittoClient implements it with one std::thread for DNS, connect, network loop and reconnect with backoff (D45, amends D42: mosquitto_loop_start() blocks the caller on DNS and stops silently on TLS/protocol errors). tst_mqtt tests it against a local mosquitto: messages, retained messages, first connect and reconnect, last will, login. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,3 +40,8 @@ set_tests_properties(surfaces_opengl surfaces_vulkan surfaces_cli_key
|
||||
qt_add_executable(tst_config tst_config.cpp)
|
||||
target_link_libraries(tst_config PRIVATE frameassistant_lib Qt6::Test)
|
||||
add_test(NAME config COMMAND tst_config)
|
||||
|
||||
# MosquittoClient against a local mosquitto broker (D30 level 2); skips without one.
|
||||
qt_add_executable(tst_mqtt tst_mqtt.cpp)
|
||||
target_link_libraries(tst_mqtt PRIVATE frameassistant_lib Qt6::Test)
|
||||
add_test(NAME mqtt COMMAND tst_mqtt)
|
||||
|
||||
Reference in New Issue
Block a user