You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing problems with returning the IPv4 address on OSX.
Rarely i see a IPv4 address but rest of the time its IPv6.
When i check with the application Bonjour Browser on OSX i see the IPv4 address without any problems, so i assume its an issue with the module.
Heres the code:
varmdns=require('mdns'),listOfOscDevices={/*name: {adresses: ['192.168.0.24', 'fe80::0:18'], port: 10001}}*/};varmdnsBrowser=mdns.createBrowser(mdns.udp('put'));mdnsBrowser.on('serviceUp',function(service){// ignore duplicate upsif(listOfOscDevices[service.name])return;listOfOscDevices[service.name]={'addresses': service.addresses,'port': service.port};varcnt=Object.keys(listOfOscDevices).length;console.log('osc device "'+service.name+' up at '+service.addresses+':'+service.port+', now '+cnt+' devices on the net');});mdnsBrowser.on('serviceDown',function(service){// ignore duplicate downsif(!listOfOscDevices[service.name])return;vardevice=listOfOscDevices[service.name];deletelistOfOscDevices[service.name];varcnt=Object.keys(listOfOscDevices).length;console.log('osc device "'+service.name+' up at '+device.addresses+':'+device.port+', now '+cnt+' devices on the net');});console.log('listening for osc-compatible devices on the net')mdnsBrowser.start();
The text was updated successfully, but these errors were encountered:
Nope, the module is fine. It is how the underlying system service behaves. IIRC, the default is to return the first address available, which is (almost) always IPv6. You can fine-tune the behavior using the resolver chain, but there will be dragons...
The best cause of action is to fix the applications to support IPv6, though.
I am experiencing problems with returning the IPv4 address on OSX.
Rarely i see a IPv4 address but rest of the time its IPv6.
When i check with the application
Bonjour Browser
on OSX i see the IPv4 address without any problems, so i assume its an issue with the module.Heres the code:
The text was updated successfully, but these errors were encountered: