method WebSocketService.prototype.replaceIngressBehaviors
Since 0.3.0
WebSocketService.prototype.replaceIngressBehaviors(behaviors: readonly IIngressBehavior[]): void

Replaces the plugin-level ingress chain around onMessage with the resolved declared sequence.

Called once by the plugin's onInit hook, after every RegistryFactory entry of WebSocketPlugin({ behaviors }) has been resolved — the first phase at which the registry holds every capability, and still before the application serves, so no frame is ever dispatched without the final chain. With no factory behaviours configured it is never called with a non-empty list, and frame dispatch keeps the direct, synchronous form.

Parameters

behaviors: readonly IIngressBehavior[]

The resolved behaviours, in declared order

Return Type

void

Usage

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