diff --git a/doc/api/dgram.md b/doc/api/dgram.md index 9efd14c89e00d7..894f64f36e135f 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -123,6 +123,21 @@ if (cluster.isMaster) { } ``` +### socket.addSourceSpecificMembership(sourceAddress, groupAddress\[, multicastInterface\]) + +* `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() + +* `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()