node-datagram-stream icon indicating copy to clipboard operation
node-datagram-stream copied to clipboard

Multicast does not bind to a specific interface.

Open dbussert opened this issue 4 years ago • 0 comments

Listening to multicast does not join a specific interface when calling socket.addMembership(multicast); The datagram documents for addMembership say:

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.

My expectation for the options provided is the multicast option is the multicast address to listen to, and the address option is the interface to receive it on. That requires changing the bind and addMembership lines like seen here. https://github.com/vidterra/node-datagram-stream/commit/a43032ddddd20f715634acf78222aac447d1414b

This is similar to the issue described here https://github.com/nodejs/node/issues/19954

dbussert avatar Jun 02 '21 17:06 dbussert