import type { ITunnelDuplexStream, ITunnelMessageSocket } from "./tunnelMessageSocket.js"; /** Options used to establish a WebSocket connection over an existing tunnel stream. */ export interface IWebSocketOverDuplexOptions { /** Request path, e.g. '/agent-host/select' or '/?tkn=abc'. */ readonly path: string; /** Host header value; the tunnel stream is already pointed at the right port. */ readonly host?: string; /** Maximum accepted frame payload length. */ readonly maxFramePayloadLength?: number; /** Maximum accepted assembled message payload length. */ readonly maxMessagePayloadLength?: number; /** Time to wait for the peer to complete a close handshake. */ readonly closeTimeoutMs?: number; } /** Opens a framed WebSocket connection over an already-connected tunnel stream. */ export declare function connectWebSocketOverDuplex(stream: ITunnelDuplexStream, options: IWebSocketOverDuplexOptions): Promise; /** Computes the RFC 6455 `Sec-WebSocket-Accept` value for a client key. */ export declare function createWebSocketAccept(key: string): Promise;