QMqttUserProperties Class
QMqttUserProperties 类表示可传递给服务器的QMqttStringPair 值列表。更多
头文件: | #include <QMqttUserProperties> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Mqtt) target_link_libraries(mytarget PRIVATE Qt6::Mqtt) |
qmake: | QT += mqtt |
继承: | QList |
详细说明
用户属性允许客户端向服务器或其他订阅者传递不属于消息有效载荷的附加数据。
另一方面,它也为服务器提供了向连接的客户端提供更多信息的灵活性。
服务器可以在所提供的属性之外添加其他用户属性。不过,所提供属性的顺序在传输过程中不会改变。
注意: 用户属性是 MQTT 5.0 规范的一部分,在使用QtMqtt 时不能使用旧协议级别。更多信息请参阅QMqttClient::ProtocolVersion 。
另请参阅 QMqttAuthenticationProperties,QMqttConnectionProperties,QMqttLastWillProperties,QMqttPublishProperties,QMqttSubscriptionProperties,QMqttUnsubscriptionProperties 和QMqttSubscription 。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.