/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { Transport } from "../Transport.js";
import type { TcpConnection, TcpListener, TcpListenerOptions } from "../tcp/TcpConnection.js";
import type { MockNetwork } from "./MockNetwork.js";
import { MockTcpConnection } from "./MockTcpConnection.js";
/**
 * Mock TCP server for testing.  Registers itself with a {@link MockNetwork} so
 * that {@link MockNetwork.connectTcp} can route incoming connections.
 */
export declare class MockTcpListener implements TcpListener {
    #private;
    readonly port: number;
    constructor(host: MockNetwork, options: TcpListenerOptions);
    /**
     * Called by {@link MockNetwork.connectTcp} when a client connects.
     * Creates a socket pair, notifies connection listeners with the server-side
     * socket, and returns the client-side socket.
     */
    accept(clientAddress: string, clientPort: number): MockTcpConnection;
    onConnection(listener: (socket: TcpConnection) => void): Transport.Listener;
    close(): Promise<void>;
}
//# sourceMappingURL=MockTcpListener.d.ts.map