How to use the node-opcua-service-discovery.acquireBonjour function in node-opcua-service-discovery

To help you get started, we’ve selected a few node-opcua-service-discovery 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 node-opcua / node-opcua / packages / node-opcua-server-discovery / src / opcua_discovery_server.js View on Github external
constructor() {

        this.registeredServers = [];

        this.bonjour = discovery_service.acquireBonjour();
        this.recordId = 0;

        this.responser = this.bonjour.find({
            type: "opcua-tcp",
            protocol: "tcp"
        });

        const addService = (service) => {
            if (doDebug) {
                debugLog(service);
            }
            // example:
            // {
            //     addresses: [ '172.18.207.145', 'fe80::d4e3:352c:9f8b:d0db' ],
            //     rawTxt: ,
            //     txt: { path: '', caps: 'LDS' },
github node-opcua / node-opcua / packages / node-opcua-server-discovery / source / mdns_responder.ts View on Github external
constructor() {

        this.registeredServers = [];

        this.multicastDNS = acquireBonjour();
        this.recordId = 0;

        this.responder = this.multicastDNS.find({
            protocol: "tcp",
            type: "opcua-tcp"
        });

        const findServiceIndex = (serverName: string) => {

            const index = this.registeredServers.findIndex(
              (server: ServerOnNetwork) => server.serverName === serverName);
            return index;

        };

        const addService = (service: bonjour.Service) => {