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()
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.