matterbridge
Version:
Matterbridge plugin manager for Matter
56 lines • 2.15 kB
TypeScript
/**
* @description This file contains the class Unicast.
* @file unicast.ts
* @author Luca Liguori
* @created 2025-03-22
* @version 1.0.0
* @license Apache-2.0
*
* Copyright 2025, 2026, 2027 Luca Liguori.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AddressInfo } from 'node:net';
import { Dgram } from './dgram.js';
/**
* This class implements a unicast dgram socket.
*/
export declare class Unicast extends Dgram {
port: number | undefined;
/**
* Creates an instance of Unicast.
*
* @param {string} name - The name of the socket.
* @param {'udp4' | 'udp6'} socketType - The type of the socket (IPv4 or IPv6).
* @param {boolean | undefined} reuseAddr - Whether to allow address reuse.
* @param {string} [interfaceName] - The name of the network interface to bind to.
* @param {string} [interfaceAddress] - The address of the network interface to bind to.
* @param {number} [port] - The port number to bind to. If not provided, it will bind to any available port.
*/
constructor(name: string, socketType: 'udp4' | 'udp6', reuseAddr?: boolean | undefined, interfaceName?: string, interfaceAddress?: string, port?: number);
/**
* Starts the dgram unicast socket.
*/
start(): void;
/**
* Event handler for the 'listening' event. This event is emitted when the socket starts listening for datagram messages.
*
* @param {AddressInfo} [address] - The address info.
*/
onListening(address: AddressInfo): void;
/**
* Stops the dgram unicast socket.
*/
stop(): void;
}
//# sourceMappingURL=unicast.d.ts.map