import type { IncomingMessage, Server } from 'node:http';
import type { Socket } from 'node:net';
import WebSocket from 'ws';
export type HttpUpgradeHandler = (request: IncomingMessage, socket: Socket, head: Buffer) => void;
export type VerifyClientFn = (info: {
    origin: string;
    secure: boolean;
    req: IncomingMessage;
}, cb: (res: boolean, code?: number, message?: string) => void) => void;
export interface WebSocketUpgradeHandlerOptions {
    wsPath: string;
    wsServer: WebSocket.Server;
    verifyClient: VerifyClientFn;
}
export interface InstallWebSocketUpgradeHandlerOptions extends WebSocketUpgradeHandlerOptions {
    httpServer: Server;
}
export declare function createWebSocketUpgradeHandler(options: WebSocketUpgradeHandlerOptions): HttpUpgradeHandler;
export declare function installWebSocketUpgradeHandler(options: InstallWebSocketUpgradeHandlerOptions): HttpUpgradeHandler;
export declare function removeWebSocketUpgradeHandler(httpServer: Server, wsPath: string, handler: HttpUpgradeHandler): void;
export declare function installUpgradeClaimHandling(server: Server): void;
//# sourceMappingURL=upgrade.d.ts.map