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

Registers a handler for frames arriving from other replicas.

Parameters

handler: RealtimeFrameHandler

Invoked per arriving frame

Return Type

Promise<() => void>

A function that removes this handler

Usage

import { DurableObjectBackplane } from "cloudflare-plugin/src/index.ts";