property WebSocketRouteOptions.protocols

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.

Type

readonly string[]

Usage

import { type WebSocketRouteOptions } from "common/src/index.ts";