/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { ServerAddressUdp } from "#net/ServerAddress.js"; import { Observable } from "#util/index.js"; export declare enum ChannelType { UDP = "udp", BLE = "ble", TCP = "tcp" } export interface Channel { /** Maximum Payload size for this channel */ maxPayloadSize: number; /** Is the transport Reliable? UDP is not, TCP and BTP are. */ isReliable: boolean; /** Does the channel support large messages? */ supportsLargeMessages: boolean; /** Channel name */ name: string; type: ChannelType; /** Method to send data to the remote endpoint */ send(data: T): Promise; /** Method to close the channel */ close(): Promise; } export interface IpNetworkChannel extends Channel { networkAddress: ServerAddressUdp; networkAddressChanged: Observable<[ServerAddressUdp]>; } /** * Returns true (and guards types) if the channel is an IP channel */ export declare function isIpNetworkChannel(channel?: Channel): channel is IpNetworkChannel; /** * Checks if two IPNetworkChannels are referencing the same address. * Both the channel type (UDP/TCP) and the address (including port) need to match. */ export declare function sameIpNetworkChannel(channel1: IpNetworkChannel, channel2: IpNetworkChannel): boolean; //# sourceMappingURL=Channel.d.ts.map