/**
 * WebSocket Protocol Type Definitions
 */
import type { WebSocketOpcode, WebSocketCloseCode } from './constants.js';
/**
 * WebSocket frame header
 */
export interface IWebSocketFrameHeader {
    fin: boolean;
    rsv1: boolean;
    rsv2: boolean;
    rsv3: boolean;
    opcode: WebSocketOpcode;
    masked: boolean;
    payloadLength: number;
    maskingKey?: Buffer;
}
/**
 * WebSocket frame
 */
export interface IWebSocketFrame {
    header: IWebSocketFrameHeader;
    payload: Buffer;
}
/**
 * WebSocket close frame payload
 */
export interface IWebSocketClosePayload {
    code: WebSocketCloseCode;
    reason?: string;
}
/**
 * WebSocket handshake request headers
 */
export interface IWebSocketHandshakeHeaders {
    upgrade: string;
    connection: string;
    'sec-websocket-key': string;
    'sec-websocket-version': string;
    'sec-websocket-protocol'?: string;
    'sec-websocket-extensions'?: string;
    [key: string]: string | undefined;
}
/**
 * Type for WebSocket raw data (matching ws library)
 */
export type RawData = Buffer | ArrayBuffer | Buffer[] | any;
