Stone.js API
    Preparing search index...

    The agnostic connection store: who is connected and which channels they are members of.

    Backed by memory (single node), Redis (multi-node) or a provider store (DynamoDB on AWS). The WS adapters populate it; the broadcaster reads it to target and to report presence.

    interface ConnectionStore {
        add: (connection: Connection) => Promise<void>;
        connectionsFor: (channel: string) => Promise<Connection<unknown>[]>;
        members: (channel: string) => Promise<PresenceMember<unknown>[]>;
        remove: (connectionId: string) => Promise<void>;
        subscribe: (connectionId: string, channel: string) => Promise<void>;
        unsubscribe: (connectionId: string, channel: string) => Promise<void>;
    }

    Implemented by

    Index
    add: (connection: Connection) => Promise<void>

    Record a new connection.

    connectionsFor: (channel: string) => Promise<Connection<unknown>[]>

    The connections that are members of a channel.

    members: (channel: string) => Promise<PresenceMember<unknown>[]>

    The presence members of a channel.

    remove: (connectionId: string) => Promise<void>

    Remove a connection and all its memberships.

    subscribe: (connectionId: string, channel: string) => Promise<void>

    Make a connection a member of a channel.

    unsubscribe: (connectionId: string, channel: string) => Promise<void>

    Remove a connection's membership of a channel.