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