/**
 * Parser utilities for protocol detection
 * Now delegates to protocol modules for actual parsing
 */
import { HttpParser, HTTP_METHODS, HTTP_VERSIONS } from '../../protocols/http/index.js';
import { tlsVersionToString as protocolTlsVersionToString } from '../../protocols/tls/index.js';
// Re-export constants for backward compatibility
export { HTTP_METHODS, HTTP_VERSIONS };
/**
 * Parse HTTP request line
 */
export function parseHttpRequestLine(line) {
    // Delegate to protocol parser
    const result = HttpParser.parseRequestLine(line);
    return result ? {
        method: result.method,
        path: result.path,
        version: result.version
    } : null;
}
/**
 * Parse HTTP header line
 */
export function parseHttpHeader(line) {
    // Delegate to protocol parser
    return HttpParser.parseHeaderLine(line);
}
/**
 * Parse HTTP headers from lines
 */
export function parseHttpHeaders(lines) {
    // Delegate to protocol parser
    return HttpParser.parseHeaders(lines);
}
/**
 * Convert TLS version bytes to version string
 */
export function tlsVersionToString(major, minor) {
    // Delegate to protocol parser
    return protocolTlsVersionToString(major, minor);
}
/**
 * Extract domain from Host header value
 */
export function extractDomainFromHost(hostHeader) {
    // Delegate to protocol parser
    return HttpParser.extractDomainFromHost(hostHeader);
}
/**
 * Validate domain name
 */
export function isValidDomain(domain) {
    // Delegate to protocol parser
    return HttpParser.isValidDomain(domain);
}
/**
 * Check if string is a valid HTTP method
 */
export function isHttpMethod(str) {
    // Delegate to protocol parser
    return HttpParser.isHttpMethod(str) && str !== undefined;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyc2VyLXV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vdHMvZGV0ZWN0aW9uL3V0aWxzL3BhcnNlci11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFHSCxPQUFPLEVBQUUsVUFBVSxFQUFFLFlBQVksRUFBRSxhQUFhLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUN4RixPQUFPLEVBQUUsa0JBQWt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