![]() |
PahoMqttCpp
MQTT C++ Client for POSIX and Windows
|
#include <server_response.h>
Public Member Functions | |
subscribe_response (MQTTAsync_successData5 *rsp) | |
subscribe_response (size_t n, MQTTAsync_successData *rsp) | |
const std::vector< ReasonCode > & | get_reason_codes () const |
![]() | |
server_response () | |
server_response (const properties &props) | |
server_response (properties &&props) | |
virtual | ~server_response () |
const properties & | get_properties () const noexcept |
Data Fields | |
std::vector< ReasonCode > | reasonCodes_ |
Friends | |
class | token |
Response for a subscribe request.
This contains the information returned from the broker in the SUBACK packet. It gives information about the granted Qos for each topc in the subscribe request.
mqtt::subscribe_response::subscribe_response | ( | MQTTAsync_successData5 * | rsp | ) |
Create v5 subscribe response.
rsp | The v5 response struct from the C lib |
mqtt::subscribe_response::subscribe_response | ( | size_t | n, |
MQTTAsync_successData * | rsp | ||
) |
Create v3 subscribe response.
n | The number of subscription topics |
rsp | The v3 response struct from the C lib |
|
inline |
Gets the reason codes from the server response.
On a subscribe ack there is a return/reason code for each topic that was sent in the subscribe packet. Each tells the granted QoS for the corresponding topic.
For MQTT v5 values over 0x80 are error codes as descibed in the MQTT v5 spec.
|
friend |
std::vector<ReasonCode> mqtt::subscribe_response::reasonCodes_ |
The reason/result code for each topic request.