How to use the node-coap-client.CoapClient.stopObserving function in node-coap-client

To help you get started, we’ve selected a few node-coap-client 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 AlCalzone / node-tradfri-client / src / tradfri-client.ts View on Github external
public stopObservingResource(path: string): void {

		path = normalizeResourcePath(path);

		// remove observer
		const observerUrl = path.startsWith(this.requestBase) ? path : `${this.requestBase}${path}`;
		const index = this.observedPaths.indexOf(observerUrl);
		if (index === -1) return;

		coap.stopObserving(observerUrl);
		this.observedPaths.splice(index, 1);
	}
github eclipse / thingweb.node-wot / packages / binding-coap / src / coaps-client.ts View on Github external
    return new Subscription(() => { coaps.stopObserving(form.href); complete(); });
  }