Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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' },
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) => {