Skip to content

Commit

Permalink
doc,dgram: fix addMembership documentation
Browse files Browse the repository at this point in the history
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 <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
santigimeno authored and Myles Borins committed Jul 14, 2016
1 parent ece428e commit 6324723
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ socket.on('message', (msg, rinfo) => {
* `multicastAddress` {String}
* `multicastInterface` {String}, Optional

Tells the kernel to join a multicast group at the given `multicastAddress`
using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface`
argument is not specified, the operating system will try to add membership to
all valid networking interfaces.
Tells the kernel to join a multicast group at the given `multicastAddress` and
`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. 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.

### socket.address()

Expand Down

0 comments on commit 6324723

Please sign in to comment.