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()
true
にオブザーブ要求を設定する。
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 のコピーを作成する。
© 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.