Skip to content

How to send a large amount of data via MQTT? #2715

Discussion options

You must be logged in to vote

I don't see any publish_status() function in the Mongoose API
I don't see any example using other function than mg_mqtt_pub()
Please follow the guidelines in the documentation, examples and tutorials available.

publish_status() is not a Mongoose API function but just an example of a function that publish es the status of something in an example of a user application. Guess what function it is using:

static void publish_status(struct mg_connection *c) {
char topic[100];
struct mg_mqtt_opts pub_opts;
struct mg_iobuf io = {0, 0, 0, 512};
// Print JSON notification into the io buffer

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by scaprile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants