How to use the mdns.hostName 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 Moddable-OpenSource / moddable / examples / network / mdns / ntpservice / main.js View on Github external
const mdns = new MDNS({hostName: "time"}, function(message, value) {
	if ((MDNS.hostName === message) && value) {
		timeService.txt.now = timeInMinutes();
		this.add(timeService);

		Timer.set(function() {
			timeService.txt.now = timeInMinutes();
			mdns.update(timeService);
		}, millisecondsToNextMinute(), 60 * 1000);
	}
});
github Moddable-OpenSource / moddable / examples / network / mdns / httpserver / main.js View on Github external
new MDNS({hostName}, function(message, value) {
	if (MDNS.hostName === message)
		hostName = value;
});