diff options
Diffstat (limited to 'doc/api/dgram.md')
-rw-r--r-- | doc/api/dgram.md | 33 |
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 |