The QCoapRequest class holds a CoAP request. This request can be sent with QCoapClient . 更多...
| 頭: | #include <QCoapRequest> |
| qmake: | QT += coap |
| 繼承: | QCoapMessage |
注意: 此類的所有函數 可重入 .
| QCoapRequest (const QCoapRequest & other ) | |
| QCoapRequest (const char * url , QCoapMessage::Type type = Type::NonConfirmable) | |
| QCoapRequest (const QUrl & url = QUrl(), QCoapMessage::Type type = Type::NonConfirmable, const QUrl & proxyUrl = QUrl()) | |
| QCoapRequest & | operator= (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 |
The QCoapRequest contains data needed to make CoAP frames that can be sent to the URL it holds.
另請參閱 QCoapClient , QCoapReply ,和 QCoapResourceDiscoveryReply .
構造副本為 other QCoapRequest.
Constructs a QCoapRequest from a string literal
Constructs a QCoapRequest object with the target url , the proxy URL proxyUrl 和 type of the message.
創建副本為 other .
銷毀 QCoapRequest .
Sets the observe to
true
to make an observe request.
另請參閱 isObserve ().
返迴
true
if the request is an observe request.
另請參閱 enableObserve ().
Returns the method of the request.
Returns the proxy URI of the request. The request shall be sent directly if this is invalid.
另請參閱 setProxyUrl ().
Sets the proxy URI of the request to the given proxyUrl .
另請參閱 proxyUrl ().
Sets the target URI of the request to the given url .
If not indicated, the scheme of the URL will default to 'coap', and its port will default to 5683.
另請參閱 url ().
Returns the target URI of the request.
另請參閱 setUrl ().