How to use the @node-wot/binding-coap.CoapsClientFactory function in @node-wot/binding-coap

To help you get started, we’ve selected a few @node-wot/binding-coap 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 eclipse / thingweb.node-wot / packages / demo-servients / src / bridge-cli-servient.ts View on Github external
console.dir(this.config);
        
        // http server for local control and monitoring
        let httpServer = (typeof this.config.http.port === "number") ? new HttpServer(this.config.http.port) : new HttpServer();
        this.addServer(httpServer);

        // remote proxy bridges
        if (this.config.fujitsu) this.addServer(new FujitsuServer(this.config.fujitsu.remote));
        if (this.config.oracle) this.addServer(new OracleServer(this.config.oracle.store, password));

        // clients for consuming
        this.addClientFactory(new FileClientFactory());
        this.addClientFactory(new HttpClientFactory(this.config.http));
        this.addClientFactory(new HttpsClientFactory(this.config.http));
        this.addClientFactory(new CoapClientFactory());
        this.addClientFactory(new CoapsClientFactory());
    }
github eclipse / thingweb.node-wot / packages / cli / src / cli-default-servient.ts View on Github external
}
            if (this.config.mqtt !== undefined) {
                let mqttBrokerServer = new MqttBrokerServer(this.config.mqtt.broker, 
                    (typeof this.config.mqtt.username === "string") ? this.config.mqtt.username : undefined,
                    (typeof this.config.mqtt.password === "string") ? this.config.mqtt.password : undefined,
                    (typeof this.config.mqtt.clientId === "string") ? this.config.mqtt.clientId : undefined,
                    (typeof this.config.mqtt.protocolVersion === "number") ? this.config.mqtt.protocolVersion : undefined);
                this.addServer(mqttBrokerServer);
            }
        }

        this.addClientFactory(new FileClientFactory());
        this.addClientFactory(new HttpClientFactory(this.config.http));
        this.addClientFactory(new HttpsClientFactory(this.config.http));
        this.addClientFactory(new CoapClientFactory(coapServer));
        this.addClientFactory(new CoapsClientFactory());
        this.addClientFactory(new MqttClientFactory());
    }

@node-wot/binding-coap

CoAP client & server protocol binding for node-wot

EPL-2.0 OR W3C-20150513
Latest version published 6 days ago

Package Health Score

63 / 100
Full package analysis

Similar packages