/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { HttpEndpoint, HttpEndpointFactory } from "@matter/general";
import type { Server, ServerResponse } from "node:http";
import { IncomingMessage } from "node:http";
/**
 * An implementation of {@link HttpEndpoint} that uses Node.js's standard {@link Server}.
 *
 * WebSocket support is optional.  You can install by importing `@matter/nodejs-ws`.
 *
 * This implementation is a little ugly because the native Node.js HTTP server API is pre-async and has some design
 * flaws.  Other runtimes tend build on WinterTC standards and adapters will be much simpler.
 */
export declare class NodeJsHttpEndpoint implements HttpEndpoint {
    #private;
    static create(config: HttpEndpoint.Configuration): Promise<NodeJsHttpEndpoint>;
    /**
     * Create a new endpoint.
     *
     * You may pass an existing {@link Server} or pass {@link HttpEndpoint.Configuration} to create a server dedicated
     * to this endpoint.
     */
    constructor(config: Server | HttpEndpoint.Configuration);
    get server(): Server<typeof IncomingMessage, typeof ServerResponse>;
    get ready(): Promise<void>;
    set http(handler: HttpEndpoint.HttpHandler | undefined);
    set ws(handler: HttpEndpoint.WsHandler | undefined);
    close: () => Promise<void>;
}
export declare namespace NodeJsHttpEndpoint {
    class Factory extends HttpEndpointFactory {
        create(config: HttpEndpoint.Configuration): Promise<NodeJsHttpEndpoint>;
    }
}
//# sourceMappingURL=NodeJsHttpEndpoint.d.ts.map