![]() |
PahoMqttCpp
MQTT C++ Client for POSIX and Windows
|
#include <message.h>
Public Types | |
| using | self = message_ptr_builder |
Public Member Functions | |
| message_ptr_builder () | |
| auto | topic (string_ref topic) -> self & |
| auto | payload (binary_ref payload) -> self & |
| auto | payload (const void *payload, size_t n) -> self & |
| auto | qos (int qos) -> self & |
| auto | retained (bool on) -> self & |
| auto | properties (mqtt::properties &&props) -> self & |
| auto | properties (const mqtt::properties &props) -> self & |
| message_ptr | finalize () |
Class to build messages.
This class
|
inline |
Default constructor.
|
inline |
Sets the topic string.
| topic | The topic on which the message is published. |
|
inline |
Sets the payload of this message to be the specified buffer. Note that this accepts copy or move operations: set_payload(buf); set_payload(std::move(buf));
| payload | A buffer to use as the message payload. |
|
inline |
Sets the payload of this message to be the specified byte array.
| payload | the bytes to use as the message payload |
| n | the number of bytes in the payload |
|
inline |
Sets the quality of service for this message.
| qos | The integer Quality of Service for the message |
|
inline |
Whether or not the publish message should be retained by the broker.
| on | true if the message should be retained by the broker, false if not. |
|
inline |
Sets the properties for the disconnect message.
| props | The properties for the disconnect message. |
|
inline |
Sets the properties for the disconnect message.
| props | The properties for the disconnect message. |
|
inline |
Finish building the options and return them.