#include <message.h>
◆ self
◆ message_ptr_builder()
mqtt::message_ptr_builder::message_ptr_builder |
( |
| ) |
|
|
inline |
◆ topic()
Sets the topic string.
- Parameters
-
topic | The topic on which the message is published. |
◆ payload() [1/2]
auto mqtt::message_ptr_builder::payload |
( |
binary_ref |
payload | ) |
-> self& |
|
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));
- Parameters
-
payload | A buffer to use as the message payload. |
◆ payload() [2/2]
auto mqtt::message_ptr_builder::payload |
( |
const void * |
payload, |
|
|
size_t |
n |
|
) |
| -> self& |
|
inline |
Sets the payload of this message to be the specified byte array.
- Parameters
-
payload | the bytes to use as the message payload |
n | the number of bytes in the payload |
◆ qos()
auto mqtt::message_ptr_builder::qos |
( |
int |
qos | ) |
-> self& |
|
inline |
Sets the quality of service for this message.
- Parameters
-
qos | The integer Quality of Service for the message |
◆ retained()
auto mqtt::message_ptr_builder::retained |
( |
bool |
on | ) |
-> self& |
|
inline |
Whether or not the publish message should be retained by the broker.
- Parameters
-
on | true if the message should be retained by the broker, false if not. |
◆ properties() [1/2]
Sets the properties for the disconnect message.
- Parameters
-
props | The properties for the disconnect message. |
◆ properties() [2/2]
Sets the properties for the disconnect message.
- Parameters
-
props | The properties for the disconnect message. |
◆ finalize()
Finish building the options and return them.
- Returns
- The option struct as built.
The documentation for this class was generated from the following file: