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

Pseudo Multicast does only add itself to the multicast group on one interface #83

Open
MofX opened this issue Dec 27, 2018 · 0 comments
Labels

Comments

@MofX
Copy link

MofX commented Dec 27, 2018

At least on windows the pseudo multicast interface adds itself to the multicast group of only one if the interfaces.

The call
sock.addMembership(MDNS_MULTICAST);
adds the socket to only one of the interfaces as described here: https://nodejs.org/api/dgram.html#dgram_socket_addmembership_multicastaddress_multicastinterface

If the multicastInterface argument is not specified, the operating system will choose one interface and will add membership to it. To add membership to every available interface, call addMembership multiple times, once per interface.

From the documentation I think it is the same for linux and maybe other OSes.

A possible fix is collecting the addresses of all interfaces while binding to them and then calling addMembership multiple times.

@kmpm kmpm added the bug label Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants