QCoapResourceDiscoveryReply Class
QCoapResourceDiscoveryReply 类存储了针对资源发现请求的 CoAP 响应数据。更多内容...
| 头文件: | #include <QCoapResourceDiscoveryReply> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Coap) target_link_libraries(mytarget PRIVATE Qt6::Coap) |
| qmake: | QT += coap |
| 继承自: | QCoapReply |
注意:本类中的所有函数均为可重入的。
公共函数
| QList<QCoapResource> | resources() const |
信号
| void | discovered(QCoapResourceDiscoveryReply *reply, QList<QCoapResource> resources) |
详细描述
此类用于发现请求。当发现资源时,它会发出discovered()信号。当使用多播地址进行发现时,discovered()信号将在收到每个响应时发出一次。
注意: QCoapResourceDiscoveryReply 是一个QCoapReply ,它还存储了一个 QCoapResources 列表。
另请参阅 QCoapClient 、QCoapRequest 、QCoapReply 以及QCoapResource 。
成员函数文档
[signal] void QCoapResourceDiscoveryReply::discovered(QCoapResourceDiscoveryReply *reply, QList<QCoapResource> resources)
每当发现一个 CoAP 资源时,都会发出此信号。
reply 参数包含指向刚刚接收到的应答的指针,而resources 包含已发现的资源列表。
另请参阅 QCoapReply::finished()。
QList<QCoapResource> QCoapResourceDiscoveryReply::resources() const
返回资源列表。
© 2026 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.