summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorLucas Pardue <lucas.pardue@bbc.co.uk>2017-10-02 13:20:52 +0100
committerAnna Henningsen <anna@addaleax.net>2019-10-17 03:12:53 +0200
commit1784b7fafac2755f870db3de9eb45a754b7a6477 (patch)
tree670a84f1ba0c508578efa5254d1960d8bfe36cce /doc/api
parent273d38b1980fe308583c430eaeb837b8e6b3d204 (diff)
downloadandroid-node-v8-1784b7fafac2755f870db3de9eb45a754b7a6477.tar.gz
android-node-v8-1784b7fafac2755f870db3de9eb45a754b7a6477.tar.bz2
android-node-v8-1784b7fafac2755f870db3de9eb45a754b7a6477.zip
dgram: add source-specific multicast support
This adds RFC 4607 support for IPv4 and IPv6. Co-Authored-By: Nicolas Thumann <46975855+n-thumann@users.noreply.github.com> Co-Authored-By: Rich Trott <rtrott@gmail.com> PR-URL: https://github.com/nodejs/node/pull/15735 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/dgram.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/api/dgram.md b/doc/api/dgram.md
index 9efd14c89e..894f64f36e 100644
--- a/doc/api/dgram.md
+++ b/doc/api/dgram.md
@@ -123,6 +123,21 @@ if (cluster.isMaster) {
}
```
+### socket.addSourceSpecificMembership(sourceAddress, groupAddress\[, multicastInterface\])
+<!-- YAML
+added: REPLACEME
+-->
+* `sourceAddress` {string}
+* `groupAddress` {string}
+* `multicastInterface` {string}
+
+Tells the kernel to join a source-specific multicast channel at the given
+`sourceAddress` and `groupAddress`, using the `multicastInterface` with the
+`IP_ADD_SOURCE_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
+`socket.addSourceSpecificMembership()` multiple times, once per interface.
+
### socket.address()
<!-- YAML
added: v0.1.99
@@ -297,6 +312,24 @@ never have reason to call this.
If `multicastInterface` is not specified, the operating system will attempt to
drop membership on all valid interfaces.
+### socket.dropSourceSpecificMembership(sourceAddress, groupAddress\[, multicastInterface\])
+<!-- YAML
+added: REPLACEME
+-->
+
+* `sourceAddress` {string}
+* `groupAddress` {string}
+* `multicastInterface` {string}
+
+Instructs the kernel to leave a source-specific multicast channel at the given
+`sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`
+socket option. This method is automatically called by the kernel when the
+socket is closed or the process terminates, so most apps will never have
+reason to call this.
+
+If `multicastInterface` is not specified, the operating system will attempt to
+drop membership on all valid interfaces.
+
### socket.getRecvBufferSize()
<!-- YAML
added: v8.7.0