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, 프록시 URL proxyUrl 및 메시지 type 를 사용하여 QCoapRequest 객체를 구성합니다.
QCoapRequest::QCoapRequest(const QCoapRequest &other)
other QCoapRequest의 복사본을 생성합니다.
[noexcept]
QCoapRequest::~QCoapRequest()
QCoapRequest 를 파괴합니다.
void QCoapRequest::enableObserve()
관찰을 true
으로 설정하여 관찰 요청을 합니다.
isObserve()도 참조하세요 .
bool QCoapRequest::isObserve() const
요청이 관찰 요청인 경우 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.