Skip to content

Commit 6324723

Browse files
santigimenoMyles Borins
authored and
Myles Borins
committed
doc,dgram: fix addMembership documentation
Adding membership using `IP_ADD_MEMBERSHIP` with interface address set to `INADDR_ANY` for `IPv4` or as an index of `0` for `IPv6` leads to using only one interface selected by the operating system. Fixes: #1692 PR-URL: #7244 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent ece428e commit 6324723

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api/dgram.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ socket.on('message', (msg, rinfo) => {
7575
* `multicastAddress` {String}
7676
* `multicastInterface` {String}, Optional
7777

78-
Tells the kernel to join a multicast group at the given `multicastAddress`
79-
using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface`
80-
argument is not specified, the operating system will try to add membership to
81-
all valid networking interfaces.
78+
Tells the kernel to join a multicast group at the given `multicastAddress` and
79+
`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the
80+
`multicastInterface` argument is not specified, the operating system will choose
81+
one interface and will add membership to it. To add membership to every
82+
available interface, call `addMembership` multiple times, once per interface.
8283

8384
### socket.address()
8485

0 commit comments

Comments
 (0)