QCoapRequest Class
QCoapRequest クラスは、CoAP リクエストを保持します。このリクエストは、QCoapClient を使用して送信できます。詳細...
| ヘッダー: | #include <QCoapRequest> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Coap) target_link_libraries(mytarget PRIVATE Qt6::Coap) |
| qmake: | QT += coap |
| 継承元: | QCoapMessage |
注:このクラスのすべての関数は再入可能である。
パブリック関数
| QCoapRequest(const char *url, QCoapMessage::Type type = Type::NonConfirmable) | |
| QCoapRequest(const QUrl &url = QUrl(), QCoapMessage::Type type = Type::NonConfirmable, const QUrl &proxyUrl = QUrl()) | |
| QCoapRequest(const QCoapRequest &other) | |
| ~QCoapRequest() | |
| void | enableObserve() |
| bool | isObserve() const |
| QtCoap::Method | method() const |
| QUrl | proxyUrl() const |
| void | setProxyUrl(const QUrl &proxyUrl) |
| void | setUrl(const QUrl &url) |
| QUrl | url() const |
| QCoapRequest & | operator=(const QCoapRequest &other) |
QCoapClient 、QCoapReply 、およびQCoapResourceDiscoveryReplyも参照してください 。
メンバ関数のドキュメント
[explicit] QCoapRequest::QCoapRequest(const char *url, QCoapMessage::Type type = Type::NonConfirmable)
文字列リテラルから QCoapRequest を生成します
[explicit] QCoapRequest::QCoapRequest(const QUrl &url = QUrl(), QCoapMessage::Type type = Type::NonConfirmable, const QUrl &proxyUrl = QUrl())
ターゲットurl 、プロキシURLproxyUrl 、およびメッセージのtype を使用して、QCoapRequest オブジェクトを生成します。
QCoapRequest::QCoapRequest(const QCoapRequest &other)
other のQCoapRequestのコピーを作成します。
[noexcept] QCoapRequest::~QCoapRequest()
QCoapRequest を削除します。
void QCoapRequest::enableObserve()
observeをtrue に設定して、observeリクエストを実行します。
isObserve()も参照してください 。
bool QCoapRequest::isObserve() const
リクエストが「observe」リクエストである場合、true を返します。
enableObserve()も参照してください 。
QtCoap::Method QCoapRequest::method() const
リクエストのメソッドを返します。
QUrl QCoapRequest::proxyUrl() const
リクエストのプロキシURIを返します。これが無効な場合、リクエストは直接送信されます。
setProxyUrl()も参照してください 。
void QCoapRequest::setProxyUrl(const QUrl &proxyUrl)
リクエストのプロキシ URI を、指定されたproxyUrl に設定します。
proxyUrl()も参照してください 。
void QCoapRequest::setUrl(const QUrl &url)
リクエストのターゲットURIを、指定されたurl に設定します。
指定がない場合、URLのスキームはデフォルトで「coap」となり、ポートはデフォルトで5683になります。
url()も参照してください 。
QUrl QCoapRequest::url() const
リクエストの対象URIを返します。
setUrl()も参照してください 。
QCoapRequest &QCoapRequest::operator=(const QCoapRequest &other)
other のコピーを作成します。
© 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.