method MessagingBackplane.prototype.subscribe
MessagingBackplane.prototype.subscribe(handler: RealtimeFrameHandler): Promise<() => void>

Registers a handler for frames arriving from other instances.

May be called more than once; each consumer plugin registers its own.

Parameters

Invoked per arriving frame

Return Type

Promise<() => void>

A function that removes this handler

Usage

import { MessagingBackplane } from "realtime-backplane-plugin/src/index.ts";