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