-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Multi-interface support (with conflict resolved). #42
Conversation
…erface to use when sending query.
…ork connection) so that library doesn't crash
…as null when none specified.
…n applications that do not have an event listener.
Would love to see this merged and released. Keep up the good work! |
Any news on this? |
sendSockets[si].on('listening', function () { | ||
if (opts.multicast !== false) { | ||
this.setMulticastTTL(opts.ttl || 255) | ||
this.setMulticastLoopback(opts.loopback !== false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not enough to send packets on this interface. For example, Linux will select default interface.
To achieve sending via proper interface the call this.setMulticastInterface(iterfaceAddress)
is required. Because this is a callback, I suggest convert entire loop body to immediately invoked function with interface address as a parameter.
Looking at these changes I'm not sure that requiring all interface list on multihomed system is a good idea. Everybody will be required to implement something similar to |
Possible fix lives in https://github.com/alexey-martynov/multicast-dns, branch 'multihomed-mutlicast'. I can create a new pull request. |
We have multi interface support in master now. Thanks for the PR though! |
This is just the work of @bnielsen1965, brought up to date with @mafintosh master and with the conflict resolved.