Creates a new instance of the driver.
Configuration options for the driver.
A NATS connection instance.
Optionalprefix?: stringAn optional prefix for NATS subjects.
Indicates whether the driver is currently active.
Sets the active state of the driver and emits corresponding events.
Dispatches a signaling message to the specified namespace.
The namespace to dispatch the message to.
The message to dispatch.
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.
Starts the driver and begins tracking NATS connection status.
Stops the driver.
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.
NATS-based signaling driver for inter-process communication.
This driver uses NATS as the underlying messaging system, allowing for distributed signaling across multiple browsers and devices.
Example