HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode/frontend/node_modules/@types/bonjour/index.d.ts
// Type definitions for bonjour 3.5
// Project: https://github.com/watson/bonjour
// Definitions by: Quentin Lampin <https://github.com/quentin-ol>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

import { RemoteInfo } from 'dgram';

declare function bonjour(opts?: bonjour.BonjourOptions): bonjour.Bonjour;
export = bonjour;
declare namespace bonjour {
    /**
     * Start a browser
     *
     * The browser listens for services by querying for PTR records of a given
     * type, protocol and domain, e.g. _http._tcp.local.
     *
     * If no type is given, a wild card search is performed.
     *
     * An internal list of online services is kept which starts out empty. When
     * ever a new service is discovered, it's added to the list and an "up" event
     * is emitted with that service. When it's discovered that the service is no
     * longer available, it is removed from the list and a "down" event is emitted
     * with that service.
     */
    interface Browser extends NodeJS.EventEmitter {
        services: RemoteService[];
        start(): void;
        update(): void;
        stop(): void;
        on(event: 'up' | 'down', listener: (service: RemoteService) => void): this;
        once(event: 'up' | 'down', listener: (service: RemoteService) => void): this;
        removeListener(event: 'up' | 'down', listener: (service: RemoteService) => void): this;
        removeAllListeners(event?: 'up' | 'down'): this;
    }
    interface BrowserOptions {
        type?: string | undefined;
        subtypes?: string[] | undefined;
        protocol?: string | undefined;
        txt?: { [key: string]: string } | undefined;
    }

    interface ServiceOptions {
        name: string;
        host?: string | undefined;
        port: number;
        type: string;
        subtypes?: string[] | undefined;
        protocol?: 'udp'|'tcp' | undefined;
        txt?: { [key: string]: string } | undefined;
        probe?: boolean | undefined;
    }

    interface BaseService {
        name: string;
        fqdn: string;
        host: string;
        port: number;
        type: string;
        protocol: string;
        subtypes: string[];
        txt: { [key: string]: string };
    }
    interface RemoteService extends BaseService {
        referer: RemoteInfo;
        rawTxt: Buffer;
        addresses: string[];
    }
    interface Service extends BaseService, NodeJS.EventEmitter {
        published: boolean;
        addresses: string[];

        stop(cb?: () => void): void;
        start(): void;
    }
    interface BonjourOptions {
        type?: 'udp4' | 'udp6' | undefined;
        multicast?: boolean | undefined;
        interface?: string | undefined;
        port?: number | undefined;
        ip?: string | undefined;
        ttl?: number | undefined;
        loopback?: boolean | undefined;
        reuseAddr?: boolean | undefined;
    }
    interface Bonjour {
        (opts?: BonjourOptions): Bonjour;
        publish(options: ServiceOptions): Service;
        unpublishAll(cb?: () => void): void;
        find(options: BrowserOptions, onUp?: (service: RemoteService) => void): Browser;
        findOne(options: BrowserOptions, cb?: (service: RemoteService) => void): Browser;
        destroy(): void;
    }
}