Listener for subscription-based events in Centrifugo channels.

This class represents a connection to a specific Centrifugo channel associated with a user. It handles event subscriptions and provides information about the connected channel and user. You can use it to manage events and to remove the associated listener when it's no longer needed.

console.log(listener.channel); // Full channel name
console.log(listener.userId); // User's ID

await listener.remove(); // Removes the listener

Accessors

Methods

Accessors

  • get channel(): string

    Full name of the Centrifugo channel.

    Returns string

    Combines the base channel name and the user ID to construct the complete channel string.

Methods

MMNEPVFCICPMFPCPTTAAATR