Skip to main content
Socket.prototype.addSourceSpecificMembership - Node documentation
method Socket.prototype.addSourceSpecificMembership

Usage in Deno

import { Socket } from "node:dgram";
Socket.prototype.addSourceSpecificMembership(
sourceAddress: string,
groupAddress: string,
multicastInterface?: string,
): void

Tells the kernel to join a source-specific multicast channel at the givensourceAddress and groupAddress, using the multicastInterface with theIP_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, callsocket.addSourceSpecificMembership() multiple times, once per interface.

When called on an unbound socket, this method will implicitly bind to a random port, listening on all interfaces.

Parameters

sourceAddress: string
groupAddress: string
optional
multicastInterface: string

Return Type

void