/** * Minimal path-based router for WS upgrades on a shared HTTP server. `ws` * doesn't dispatch by path across multiple WebSocketServer instances on its * own when they're all attached with `noServer: true`, so this wires the * single `upgrade` event to the right one. */ import type { Server as HttpServer } from "node:http"; import type { IncomingMessage } from "node:http"; import type { WebSocket, WebSocketServer } from "ws"; export interface WebSocketRoute { path: string; wss: WebSocketServer; onConnection: (ws: WebSocket, req: IncomingMessage, params: URLSearchParams) => void; } export declare function attachWebSocketRouters(server: HttpServer, routes: WebSocketRoute[]): void; //# sourceMappingURL=ws-router.d.ts.map