The RealtimeChannelBase class acts as a base class for the RealtimeChannelCallbacks and RealtimeChannelPromise classes.

Hierarchy

Constructors

Properties

errorReason: Types.ErrorInfo

An ErrorInfo object describing the last error which occurred on the channel, if any.

modes: ChannelModes

An array of ChannelMode objects.

name: string

The channel name.

params: ChannelParams

Optional channel parameters that configure the behavior of the channel.

state: ChannelState

The current ChannelState of the channel.

Methods

  • Registers the provided listener for the specified event. If on() is called more than once with the same listener and event, the listener is added multiple times to its listener registry. Therefore, as an example, assuming the same listener is registered twice using on(), and an event is emitted once, the listener would be invoked twice.

    Parameters

    Returns void

  • Registers the provided listener for the specified events. If on() is called more than once with the same listener and event, the listener is added multiple times to its listener registry. Therefore, as an example, assuming the same listener is registered twice using on(), and an event is emitted once, the listener would be invoked twice.

    Parameters

    Returns void

  • Registers the provided listener all events. If on() is called more than once with the same listener and event, the listener is added multiple times to its listener registry. Therefore, as an example, assuming the same listener is registered twice using on(), and an event is emitted once, the listener would be invoked twice.

    Parameters

    Returns void

  • Registers the provided listener for the first occurrence of a single named event specified as the Event argument. If once is called more than once with the same listener, the listener is added multiple times to its listener registry. Therefore, as an example, assuming the same listener is registered twice using once, and an event is emitted once, the listener would be invoked twice. However, all subsequent events emitted would not invoke the listener as once ensures that each registration is only invoked once.

    Parameters

    Returns void

  • Registers the provided listener for the first event that is emitted. If once() is called more than once with the same listener, the listener is added multiple times to its listener registry. Therefore, as an example, assuming the same listener is registered twice using once(), and an event is emitted once, the listener would be invoked twice. However, all subsequent events emitted would not invoke the listener as once() ensures that each registration is only invoked once.

    Parameters

    Returns void

  • Returns a promise which resolves upon the first occurrence of a single named event specified as the Event argument.

    Returns

    A promise which resolves upon the first occurrence of the named event.

    Parameters

    Returns Promise<ChannelStateChange>

  • Returns a promise which resolves upon the first occurrence of an event.

    Returns

    A promise which resolves upon the first occurrence of an event.

    Returns Promise<ChannelStateChange>

  • Deregisters the given listener for the specified event name. This removes an earlier event-specific subscription.

    Parameters

    Returns void

  • Deregisters the given listener from all event names in the array.

    Parameters

    Returns void

  • Deregisters all listeners for the given event name.

    Parameters

    • event: string

      The event name.

    Returns void

  • Deregisters all listeners for all event names in the array.

    Parameters

    • events: string[]

      An array of event names.

    Returns void

  • Deregisters all listeners to messages on this channel that match the supplied filter.

    Parameters

    Returns void

  • Deregisters the given listener (for any/all event names). This removes an earlier subscription.

    Parameters

    Returns void

  • Deregisters all listeners to messages on this channel. This removes all earlier subscriptions.

    Returns void

Generated using TypeDoc