/**
 * WebSocket Protocol Utilities
 */
import type { RawData } from './types.js';
/**
 * Get the length of a WebSocket message regardless of its type
 * (handles all possible WebSocket message data types)
 */
export declare function getMessageSize(data: RawData): number;
/**
 * Convert any raw WebSocket data to Buffer for consistent handling
 */
export declare function toBuffer(data: RawData): Buffer;
/**
 * Generate WebSocket accept key from client key
 */
export declare function generateAcceptKey(clientKey: string): string;
/**
 * Validate WebSocket upgrade request
 */
export declare function isWebSocketUpgrade(headers: Record<string, string>): boolean;
/**
 * Generate random WebSocket key for client handshake
 */
export declare function generateWebSocketKey(): string;
