Creates a new instance of the driver.
Optionaloptions: { delay?: number }Optional configuration for the driver.
Optionaldelay?: numberDelay (in milliseconds) for message delivery to simulate network latency. The delay will be a random value between 75% and 125% of the specified delay.
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.
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.
In-memory signaling driver for intra-process communication.
This driver is useful for testing and debugging purposes, but is not suitable for production use due to its limitations (e.g. single-process scope).
Example