method RoomRegistry.prototype.deliverRemote
Since 0.2.0
RoomRegistry.prototype.deliverRemote(
name: string,
data: string | Uint8Array,
exceptId?: string
): void

Delivers a frame that arrived from another replica to this replica's local members.

A room is looked up but never CREATED here. A remote frame naming a room nobody on this replica has joined has no local audience, and creating one per arriving name would let a cluster-wide namespace grow this replica's room map without bound.

Parameters

name: string

The room the frame was addressed to

data: string | Uint8Array

The decoded payload

optional
exceptId: string

Connection ID the originating replica excluded, if any

Return Type

void

Usage

import { RoomRegistry } from "websocket-plugin/src/index.ts";