How to use the mdns.browseThemAll function in mdns

To help you get started, we’ve selected a few mdns examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github luan007 / edge-node-wrt / System / SubSys / Native / mdns.ts View on Github external
constructor() {
        super();
        //hook all sorts of events
        //because:
        //
        //https://github.com/agnat/node_mdns/issues/91
        info("Initializing MDNS Browser");
        this.browser = mdns.browseThemAll();
        this.browser.on("serviceUp",(service) => {
            this.browseService(service);
        });
        //this.browser.on("serviceDown",(service) => {
        //    this.dropService(service);
        //});
        this.browser.on("error",(err) => {
            //warn(err);
        });
    }
github luan007 / edge-node-wrt / SYS / Common / Native / mdns_.ts View on Github external
constructor() {
        super();
        //hook all sorts of events
        //because:
        //
        //https://github.com/agnat/node_mdns/issues/91
        info("Initializing MDNS Browser");
        this.browser = mdns.browseThemAll();
        this.browser.on("serviceUp",(service) => {
            this.browseService(service);
        });
        //this.browser.on("serviceDown",(service) => {
        //    this.dropService(service);
        //});
        this.browser.on("error",(err) => {
            //warn(err);
        });
    }