Stone.js API
    Preparing search index...

    Redis pub/sub broadcaster.

    Fans a broadcast out across every instance via Redis pub/sub: broadcast publishes on a Redis channel; each instance subscribes and delivers to its local listeners (the sockets a WS adapter registered). Uses a dedicated subscriber connection (a Redis connection in subscribe mode cannot run other commands). ioredis is imported lazily as an optional peer dependency. Presence is read from the injected ConnectionStore.

    Implements

    Index
    name: string

    A human-readable name (e.g. 'memory', 'redis').

    store: ConnectionStore = ...

    The connection store.

    • Type Parameters

      • T = unknown

      Parameters

      • channel: string
      • event: string
      • Optionalpayload: T

      Returns Promise<void>

    • Parameters

      • channel: string

      Returns { emit: <T = unknown>(event: string, payload?: T) => Promise<void> }