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
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:
If the protocol is
tcp
, then i see the log event "found the service", but if i set the protocol toudp
, 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