PySide6.QtCoap.QCoapReply¶
- class QCoapReply¶
- The - QCoapReplyclass holds the data of a CoAP reply. More…- Inherited by: - QCoapResourceDiscoveryReply- Synopsis¶- Methods¶- def - abortRequest()
- def - errorReceived()
- def - isAborted()
- def - isFinished()
- def - isRunning()
- def - isSuccessful()
- def - message()
- def - method()
- def - request()
- def - responseCode()
- def - url()
 - Signals¶- def - aborted()
- def - error()
- def - finished()
- def - notified()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- The - QCoapReplycontains 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.- abortRequest()¶
 - Aborts the request immediately and emits the - aborted(const QCoapToken &token)signal if the request was not finished.- aborted(token)¶
- Parameters:
- token – - QByteArray
 
 - This signal is emitted when the request is aborted or the reply is deleted. Its - tokenparameter is the token of the exchange that has been aborted.- Note - If the - QCoapReplyis deleted while not finished, both aborted() and- finished()signal will be emitted immediately before the- QCoapReplyis destroyed. Given the- QCoapReplymay have been deleted when receiving the signal, you should not rely on the sender() object to be still valid.- See also - error(reply, error)¶
- Parameters:
- reply – - QCoapReply
- error – - Error
 
 
 - This signal is emitted whenever an error occurs and is followed by the - finished()signal.- Its - replyparameters is the- QCoapReplyitself for convenience, and the- errorparameter is the error received.- See also - Returns the error of the reply or QCoapReply::NoError if there is no error. - finished(reply)¶
- Parameters:
- reply – - QCoapReply
 
 - This signal is emitted whenever the corresponding request finished, whether successfully or not. When a resource is observed, this signal will only be emitted once, when the observation ends. - The - replyparameter is the- QCoapReplyitself for convenience.- Note - If the - QCoapReplyis deleted while not finished, both- aborted()and finished() signal will be emitted immediately before the- QCoapReplyis destroyed. Given the- QCoapReplymay have been deleted when receiving the signal, you should not rely on the- replyto be still valid.- See also - isAborted()¶
- Return type:
- bool 
 
 - Returns - trueif the request has been aborted.- isFinished()¶
- Return type:
- bool 
 
 - Returns - trueif the request is finished.- See also - isRunning()¶
- Return type:
- bool 
 
 - Returns - trueif the request is running.- isSuccessful()¶
- Return type:
- bool 
 
 - Returns - trueif the request finished with no error.- message()¶
- Return type:
 
 - Returns the contained message. - Returns the method of the associated request. - notified(reply, message)¶
- Parameters:
- reply – - QCoapReply
- message – - QCoapMessage
 
 
 - This signal is emitted whenever a notification is received from an observed resource. - Its - messageparameter is a- QCoapMessagecontaining the payload and the message details. The- replyparameter is the- QCoapReplyitself for convenience.- See also - request()¶
- Return type:
 
 - Returns the associated request. - responseCode()¶
- Return type:
 
 - Returns the response code of the request. - Returns the target uri of the associated request.