Per-route configuration supplied alongside the handlers.
protocols: readonly string[]
Subprotocols this route accepts. When non-empty, the first client-requested
protocol appearing in this list is echoed back and any request whose
Sec-WebSocket-Protocol matches none of them is rejected with 400. When
omitted, no protocol is negotiated and none is echoed.
guards: readonly WebSocketUpgradeGuard[]
Guards evaluated before this route's WebSocket handshake is accepted.
They run in declared order. The first guard that returns a refusal object rejects the upgrade; when omitted, the matching route accepts upgrades as it did before route-scoped guards existed.
heartbeat: boolean
Whether this route participates in the shared heartbeat sweep.
When false, the HeartbeatSweeper skips this route's connections
for both the payload send and the idle eviction. Use this when the route
speaks its own liveness protocol (e.g. graphql-transport-ws ping/pong)
that would be corrupted by a generic text heartbeat.
Defaults to true so existing routes are unaffected.