/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { Channel, ChannelType, IpNetworkChannel } from "#net/Channel.js"; import { ConnectionlessTransport } from "#net/ConnectionlessTransport.js"; import { Network } from "#net/Network.js"; import { Bytes } from "#util/Bytes.js"; import { Observable } from "#util/index.js"; import { ServerAddress, ServerAddressUdp } from "../ServerAddress.js"; import { UdpChannel } from "./UdpChannel.js"; export declare class UdpInterface implements ConnectionlessTransport { #private; static create(network: Network, type: "udp4" | "udp6", port?: number, host?: string, netInterface?: string): Promise; constructor(server: UdpChannel); protected get server(): UdpChannel; supports(type: ChannelType, address: string): boolean; openChannel(address: ServerAddress): Promise; onData(listener: (channel: Channel, messageBytes: Bytes) => void): ConnectionlessTransport.Listener; get port(): number; close(): Promise; addMembership(address: string): import("#util/index.js").MaybePromise; dropMembership(address: string): import("#util/index.js").MaybePromise; } export declare class UdpConnection implements IpNetworkChannel { #private; readonly isReliable = false; readonly supportsLargeMessages = false; readonly type = ChannelType.UDP; readonly networkAddressChanged: Observable<[ServerAddressUdp], void>; constructor(server: UdpChannel, peerAddress: string, peerPort: number); get maxPayloadSize(): number; send(data: Bytes): Promise; get name(): string; get networkAddress(): ServerAddressUdp; set networkAddress(address: ServerAddressUdp); close(): Promise; } //# sourceMappingURL=UdpInterface.d.ts.map