HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
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/vhost/disk-apps/alq-cali.bikenow.co/node_modules/bonjour-service/dist/index.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Browser = exports.Service = exports.Bonjour = void 0;
const registry_1 = __importDefault(require("./lib/registry"));
const mdns_server_1 = __importDefault(require("./lib/mdns-server"));
const browser_1 = __importDefault(require("./lib/browser"));
exports.Browser = browser_1.default;
const service_1 = __importDefault(require("./lib/service"));
exports.Service = service_1.default;
class Bonjour {
    constructor(opts = {}, errorCallback) {
        this.server = new mdns_server_1.default(opts, errorCallback);
        this.registry = new registry_1.default(this.server);
    }
    publish(opts) {
        return this.registry.publish(opts);
    }
    unpublishAll(callback) {
        return this.registry.unpublishAll(callback);
    }
    find(opts = null, onup) {
        return new browser_1.default(this.server.mdns, opts, onup);
    }
    findOne(opts = null, timeout = 10000, callback) {
        const browser = new browser_1.default(this.server.mdns, opts);
        var timer;
        browser.once('up', (service) => {
            if (timer !== undefined)
                clearTimeout(timer);
            browser.stop();
            if (callback)
                callback(service);
        });
        timer = setTimeout(() => {
            browser.stop();
            if (callback)
                callback(null);
        }, timeout);
        return browser;
    }
    destroy(callback) {
        this.registry.destroy();
        this.server.mdns.destroy(callback);
    }
}
exports.Bonjour = Bonjour;
exports.default = Bonjour;
//# sourceMappingURL=index.js.map