QCoapReply Class
The QCoapReply class holds the data of a CoAP reply. More...
Header: | #include <QCoapReply> |
qmake: | QT += coap |
Inherits: | QIODevice |
Inherited By: |
Note: All functions in this class are reentrant.
Public Functions
virtual | ~QCoapReply() override |
void | abortRequest() |
QtCoap::Error | errorReceived() const |
bool | isAborted() const |
bool | isFinished() const |
bool | isRunning() const |
bool | isSuccessful() const |
QCoapMessage | message() const |
QtCoap::Method | method() const |
QCoapRequest | request() const |
QtCoap::ResponseCode | responseCode() const |
QUrl | url() const |
Detailed Description
The QCoapReply contains data related to a request sent with the QCoapClient.
The finished() signal is emitted when the response is fully received or when the request fails.
For Observe requests specifically, the notified() signal is emitted whenever a notification is received.
See also QCoapClient, QCoapRequest, and QCoapResourceDiscoveryReply.
Member Function Documentation
[override virtual]
QCoapReply::~QCoapReply()
Destroys the QCoapReply and aborts the request if its response has not yet been received.
void QCoapReply::abortRequest()
Aborts the request immediately and emits the aborted(const QCoapToken &token) signal if the request was not finished.
QtCoap::Error QCoapReply::errorReceived() const
Returns the error of the reply or QCoapReply::NoError if there is no error.
bool QCoapReply::isAborted() const
Returns true
if the request has been aborted.
bool QCoapReply::isFinished() const
Returns true
if the request is finished.
See also finished().
bool QCoapReply::isRunning() const
Returns true
if the request is running.
bool QCoapReply::isSuccessful() const
Returns true
if the request finished with no error.
QCoapMessage QCoapReply::message() const
Returns the contained message.
QtCoap::Method QCoapReply::method() const
Returns the method of the associated request.
QCoapRequest QCoapReply::request() const
Returns the associated request.
QtCoap::ResponseCode QCoapReply::responseCode() const
Returns the response code of the request.
QUrl QCoapReply::url() const
Returns the target uri of the associated request.