Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't work with udp ? #52

Open
bradwbradw opened this issue Apr 1, 2019 · 0 comments
Open

doesn't work with udp ? #52

bradwbradw opened this issue Apr 1, 2019 · 0 comments

Comments

@bradwbradw
Copy link

bradwbradw commented Apr 1, 2019

Either it's starting up, but can't find the udp service, or it says it's starting up but it's not. no error messages are occurring. Here is the code:


var bonjour = require('bonjour')();

var name = 'brad bonjour';
var type = 'a cool type';

var service = bonjour.publish({ 
	name, 
	type, 
	port: 3030,
	protocol: 'udp'
});
service.start();

service.on('error', error =>{
	console.log('error', error);
})

service.on('up', () => {
	console.log('it is now up');

})


bonjour.find({ type }, function (service) {
		if (service.name === name){
			console.log('found the service', service);
		} else {
			console.log('.');
		}
})

If the protocol is tcp, then i see the log event "found the service", but if i set the protocol to udp, there is no log event, but I would expect there to be one. Either way, i do see the "it is now up" log event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant