Dispatches an event to all registered listeners.
Listeners with the same priority are executed concurrently.
Propagation stops if any listener returns false
.
The name of the event to emit.
The server instance.
The data associated with the event.
A promise that resolves to true
if all listeners returned true
, or false
otherwise.
Adds a listener for a specific event.
The name of the event to listen for.
The callback function.
Optional
priority: number = 0The priority of the listener. Higher priority listeners are executed first.
A unique identifier for the listener.
EventBus class for managing event listeners and dispatching events.