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
返回资源列表。
© 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.