Creates a new instance of the driver.
Optional configuration for the driver.
The MQTT client instance.
Optionalprefix?: stringOptional prefix for MQTT topics.
Indicates whether the driver is currently active.
Sets the active state of the driver and emits corresponding events.
Destroys the driver instance, cleaning up any resources.
Emits an internal event with optional data.
The event name.
The data to pass to event handlers.
Unregisters an event handler for the specified internal event.
The event name.
The event handler function to remove.
Registers an event handler for the specified internal event.
The event name.
The event handler function.
Publishes a signaling message to the specified namespace.
The namespace to publish the message to.
The message data to publish.
Subscribes to signaling messages for the specified namespace.
The namespace to subscribe to.
The handler function to call when a message is received.
Unsubscribes from signaling messages for the specified namespace.
The namespace to unsubscribe from.
The handler function to remove.
MQTT-based signaling driver.
This driver uses MQTT as the underlying messaging system, allowing signaling messages to be exchanged through an MQTT broker such as Mosquitto.
Example
Running a local MQTT broker with WebSocket support for testing: