/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { Bytes } from "#util/Bytes.js"; import type { Transport } from "../Transport.js"; import type { TcpConnection } from "../tcp/TcpConnection.js"; /** * Mock TCP connection for testing. Two connections are created as a connected pair; * data written to one is delivered to the other via async iteration. */ export declare class MockTcpConnection implements TcpConnection { #private; readonly remoteAddress: string; readonly remotePort: number; readonly localPort: number; private constructor(); /** * Create a connected pair of mock TCP connections. */ static createPair(clientAddress: string, clientPort: number, serverAddress: string, serverPort: number): [client: MockTcpConnection, server: MockTcpConnection]; send(data: Bytes): Promise; [Symbol.asyncIterator](): AsyncIterator; onClose(listener: () => void): Transport.Listener; onError(listener: (error: Error) => void): Transport.Listener; close(): Promise; } //# sourceMappingURL=MockTcpConnection.d.ts.map