Files
esp-protocols/components/mosquitto/api.md

1.2 KiB

API Reference

Header files

File mosq_broker.h

Structures and Types

Type Name
struct mosq_broker_config
Mosquitto configuration structure.

Functions

Type Name
int mosq_broker_start (struct mosq_broker_config *config)
Start mosquitto broker.

Structures and Types Documentation

struct mosq_broker_config

Mosquitto configuration structure.

ESP port of mosquittto supports only the options in this configuration structure.

Variables:

  • char * host
    Address on which the broker is listening for connections

  • int port
    Port number of the broker to listen to

Functions Documentation

function mosq_broker_start

Start mosquitto broker.

int mosq_broker_start (
    struct mosq_broker_config *config
)

This API runs the broker in the calling thread and blocks until the mosquitto exits.

Parameters:

  • config Mosquitto configuration structure

Returns:

int Exit code (0 on success)