feat(mosq): Add API docs, memory consideration and tests

This commit is contained in:
David Cermak
2024-09-16 08:54:59 +02:00
parent 5c850cdad3
commit a20c0c9d2c
7 changed files with 146 additions and 7 deletions

View File

@@ -8,9 +8,24 @@
struct mosquitto__config;
/**
* @brief Mosquitto configuration structure
*
* ESP port of mosquittto supports only the options in this configuration
* structure.
*/
struct mosq_broker_config {
char *host;
int port;
char *host; /*!< Address on which the broker is listening for connections */
int port; /*!< Port number of the broker to listen to */
};
int run_broker(struct mosq_broker_config *config);
/**
* @brief Start mosquitto broker
*
* This API runs the broker in the calling thread and blocks until
* the mosquitto exits.
*
* @param config Mosquitto configuration structure
* @return int Exit code (0 on success)
*/
int mosq_broker_start(struct mosq_broker_config *config);