← Chrome 158 reference · All APIs

v158 · isolated web apps · enabled by default

Source Specific Multicast for Direct Sockets API

Extends MulticastController in the Direct Sockets API with Source-Specific Multicast (SSM) support for Isolated Web Apps. Passing an optional { sourceAddress } in MulticastGroupOptions to joinGroup() and leaveGroup() subscribes to UDP multicast datagrams from a single unicast sender rather than Any-Source Multicast (ASM), and reports active SSM subscriptions as MulticastMembership dictionaries in joinedGroups.

Limited availability — Chromium-only Isolated Web App API (not Baseline; no webstatus.dev or BCD entry)

  • Chrome · 158 (desktop IWAs only)
  • Edge · Unknown (Chromium-based; IWA availability unconfirmed)
  • Firefox · No support (negative on parent Direct Sockets API)
  • Safari · No support (WebKit IWA position open, no signal)

Direct Sockets has no web-feature entry on webstatus.dev and no MDN Browser Compat Data (BCD) file (checked 2026-11-24). Support is restricted to desktop Isolated Web Apps in Chromium.

at a glance

Shipped inChrome 158 (desktop Isolated Web Apps), enabled by default — filed under “Enabled by default” in the milestone=158 listing; Android, Android WebView, and iOS are null (not supported) in the ChromeStatus API record
Runtime flagBlink runtime feature SourceSpecificMulticastInDirectSockets (status: "stable" in runtime_enabled_features.json5); prior dev trial from Chrome 152 behind chrome://flags/#source-specific-multicast-in-direct-sockets; Finch name SourceSpecificMulticastInDirectSockets
SpecificationWICG Direct Sockets API — MulticastGroupOptions.sourceAddress (Community Group Draft)
ExplainerMulticast in Direct Sockets explainer
IntentsIntent to Prototype · Ready for Developer Testing · Intent to Ship
Tracking bugissues.chromium.org/461262401
Permissions policyRequires an Isolated Web App (IsolatedContext + SecureContext) granted both direct-sockets and direct-sockets-multicast permissions policies, plus local-network / loopback-network checks for bound UDP sockets
ChromeStatus6208452397498368 — Source Specific Multicast for Direct Sockets API

why it exists

Any-Source Multicast (ASM) subscribes a bound UDP socket to every host sending to a multicast group address. IETF RFC 8815 deprecates ASM for inter-domain use because off-path senders can flood group subscribers and inter-domain routing requires complex rendezvous state. Prior to Chrome 158, Isolated Web Apps using MulticastController could only join ASM groups, limiting deployment to private networks and forcing application-layer packet filtering. Source-Specific Multicast (RFC 4607, RFC 4604) delegates source filtering to the OS socket layer and IGMPv3/MLDv2 routers, matching POSIX MCAST_JOIN_SOURCE_GROUP / IP_ADD_SOURCE_MEMBERSHIP and Node.js dgram.

Source: ChromeStatus motivation (6208452397498368); WICG/direct-sockets#80; RFC 8815; RFC 4607.

Syntax & WebIDL

SSM extends the existing MulticastController interface (obtained from (await udpSocket.opened).multicastController on a bound UDPSocket) with two dictionaries and an optional options argument on joinGroup() and leaveGroup():

// Verbatim from WICG Direct Sockets API specification
dictionary MulticastGroupOptions {
  DOMString sourceAddress;
};

dictionary MulticastMembership {
  DOMString groupAddress;
  DOMString sourceAddress;
};

[
  Exposed=(Window, DedicatedWorker),
  SecureContext,
  IsolatedContext
]
interface MulticastController {
  Promise<undefined> joinGroup(
    DOMString groupAddress,
    optional MulticastGroupOptions options = {}
  );
  Promise<undefined> leaveGroup(
    DOMString groupAddress,
    optional MulticastGroupOptions options = {}
  );
  readonly attribute FrozenArray<(DOMString or MulticastMembership)> joinedGroups;
};

In Chromium’s multicast_controller.idl, MulticastMembership.groupAddress is marked required, sourceAddress on both dictionaries is gated by [RuntimeEnabled=SourceSpecificMulticastInDirectSockets], and MulticastController is additionally exposed in SharedWorker and ServiceWorker behind their respective Direct Sockets runtime flags.

This reference documents all five SSM surface items: MulticastGroupOptions, MulticastMembership, MulticastController.joinGroup(), MulticastController.leaveGroup(), and MulticastController.joinedGroups.

Source: WICG Direct Sockets spec (fetched 2026-11-24); Blink multicast_controller.idl.

MulticastGroupOptions dictionary

Inputs & validation. Passed as the optional second parameter to joinGroup() and leaveGroup() (defaults to {}).

Members of MulticastGroupOptions
MemberTypeDefaultContract & constraints
sourceAddressDOMString (optional)Omitted (ASM)IPv4 or IPv6 literal identifying the single unicast sender to accept (or drop). Must not be empty, multicast (224.0.0.0/4 or ff00::/8), loopback (127.0.0.0/8, ::1), or unspecified/zero (0.0.0.0, ::), and must match the IP address family of groupAddress.

Outputs & behavior. Omitting sourceAddress preserves Any-Source Multicast (ASM) semantics. Supplying a valid unicast IP literal switches the operation to Source-Specific Multicast (SSM). By IANA convention, SSM groups use 232.0.0.0/8 (IPv4) or ff3x::/32 (IPv6), but neither the spec nor Chromium restricts groupAddress to those sub-ranges — any valid multicast address is accepted with a source filter.

Source: WICG Direct Sockets spec; Multicast explainer; Blink multicast_controller.cc.

MulticastMembership dictionary

Inputs & outputs. A read-only dictionary returned inside the FrozenArray from multicastController.joinedGroups for every active SSM subscription (ASM subscriptions remain plain DOMString group addresses for backward compatibility).

Members of MulticastMembership
MemberTypeDescription
groupAddressDOMStringThe canonicalized multicast group IP address string of the joined subscription.
sourceAddressDOMStringThe canonicalized unicast source IP address string for this SSM subscription. Always populated on objects returned by joinedGroups.
Source: WICG Direct Sockets spec; Blink multicast_controller.idl.

MulticastController.joinGroup(groupAddress, options)

Inputs. Accepts groupAddress (required DOMString IPv4/IPv6 multicast literal) and optional options (MulticastGroupOptions, default {}). Hostnames are not resolved — both addresses must be IP literals parsed via net::IPAddress::FromIPLiteral in Blink.

Outputs & side effects. Returns a Promise<undefined>. On success, invokes the OS socket join (MCAST_JOIN_SOURCE_GROUP / IP_ADD_SOURCE_MEMBERSHIP for SSM; IP_ADD_MEMBERSHIP / IPV6_JOIN_GROUP for ASM), emits an IGMPv3 or MLDv2 membership report on the local link, adds the (groupAddress, sourceAddress) membership to [[joinedGroups]], and fulfills with undefined. Multiple distinct sourceAddress joins for the same groupAddress are additive (RFC 4604).

Errors. See Errors & validation matrix: invalid or mismatched IP addresses reject/throw TypeError; closed sockets, duplicate or in-flight joins, or mixing ASM and SSM on the same group throw/reject InvalidStateError; socket closure mid-operation rejects with AbortError; OS join failure rejects with NetworkError.

Source: WICG Direct Sockets spec; Blink multicast_controller.cc.

MulticastController.leaveGroup(groupAddress, options)

Inputs. Accepts groupAddress and optional options (MulticastGroupOptions). Both groupAddress and options.sourceAddress must match an active membership previously established via joinGroup(): leaving an SSM membership requires passing the exact { sourceAddress }, and leaving an ASM membership requires omitting sourceAddress.

Outputs & side effects. Returns a Promise<undefined>. On success, invokes the OS leave call (MCAST_LEAVE_SOURCE_GROUP / IP_DROP_SOURCE_MEMBERSHIP for SSM; IP_DROP_MEMBERSHIP / IPV6_LEAVE_GROUP for ASM), removes only that matching membership from [[joinedGroups]] (other SSM sources for the same group stay active), and fulfills with undefined. Calling leaveGroup() before udpSocket.close() is optional because closing the socket drops all memberships automatically.

Source: WICG Direct Sockets spec; Blink multicast_controller.cc.

MulticastController.joinedGroups

Inputs & outputs. Read-only getter returning a FrozenArray<(DOMString or MulticastMembership)> snapshot of committed memberships (entries still in the kJoining in-flight state are excluded until their joinGroup() promise resolves). ASM memberships appear as DOMString group addresses; SSM memberships appear as { groupAddress, sourceAddress } objects. This distinction also serves as the runtime feature-detection signal: on Chromium builds without SSM, options.sourceAddress is ignored by WebIDL dictionary parsing, joinGroup() falls back to an ASM join, and joinedGroups contains a string instead of a MulticastMembership object.

Source: WICG Direct Sockets spec; ChromeStatus interop notes; Blink multicast_controller.cc.

Errors & validation

Because WebIDL promise-returning operations convert synchronous exceptions into rejected promises, callers should handle all errors below via try / catch around await:

Rejection conditions verified against WICG Direct Sockets spec and Blink multicast_controller.cc
ErrorMethod(s)Condition
TypeErrorjoinGroup(), leaveGroup()groupAddress is empty, not a valid IPv4/IPv6 literal, or not a multicast address (224.0.0.0/4 or ff00::/8).
TypeErrorjoinGroup(), leaveGroup()options.sourceAddress is present and is empty, not a valid IP literal, a multicast address, the zero/unspecified address (0.0.0.0 or ::), a loopback address (127.0.0.0/8 or ::1), or a different IP version from groupAddress.
InvalidStateError (DOMException)joinGroup()Socket is closed/aborted; identical (groupAddress, sourceAddress) is already joined or in-flight; or an ASM membership/join already exists for groupAddress when joining SSM (or vice versa — ASM and SSM cannot be mixed on the same group on one socket).
InvalidStateError (DOMException)leaveGroup()Socket is closed/aborted; matching (groupAddress, sourceAddress) is not currently joined; or a leaveGroup() for that membership is already in-flight.
AbortError (DOMException)joinGroup(), leaveGroup()The underlying UDPSocket is closed or aborted while the OS join/leave request is still pending (OnCloseOrAbort() in Blink).
NetworkError (DOMException)joinGroup(), leaveGroup()The operating system rejects the underlying socket option (e.g., no route, network interface missing, or OS SSM limit reached).
NotAllowedError (DOMException)new UDPSocket()Document lacks the direct-sockets or direct-sockets-multicast permissions policy (prevents obtaining multicastController).
Silent ASM fallback (no throw)joinedGroupsThe joinedGroups getter never throws; on Chrome < 158 where sourceAddress is ignored, joinedGroups returns a plain string instead of a MulticastMembership object.
Source: Blink multicast_controller.cc; WICG Direct Sockets spec.

Context, permissions & exposure

MulticastController is available only in a SecureContext and IsolatedContext (an installed desktop Isolated Web App). The spec exposes it on Window and DedicatedWorker; Chromium’s IDL also supports SharedWorker and ServiceWorker behind their Direct Sockets flags. A multicastController property is populated on UDPSocketOpenInfo only when:

Source: WICG Direct Sockets spec; ChromeStatus security & activation notes; Blink multicast_controller.idl.

Lifecycle & state transitions

Each (groupAddress, sourceAddress) pair has an independent membership lifecycle on a bound UDPSocket: unjoined → joining → joined → leaving → unjoined. While a join is in flight, duplicate joins and opposite-mode (ASM vs. SSM) joins for the same groupAddress immediately reject with InvalidStateError to close TOCTOU races. Multiple SSM sources for the same group may be joined and left independently. Closing or aborting the UDPSocket transitions MulticastController to closed, clears all tracked memberships, rejects any pending join/leave promises with AbortError, and relies on the OS to drop all group memberships.

Source: Blink multicast_controller.cc; ChromeStatus ergonomics notes.

Examples

No interactive demo exists yet on the Chrome Platform Showcase for Chrome 158 (HEAD-checked 404 on 2026-11-24). Live ecosystem examples linked by ChromeStatus include blockcast.network/live.

Joining an SSM group, verifying SSM support, and reading datagrams

// Isolated Web App with "direct-sockets" and "direct-sockets-multicast" policies.
const GROUP = "232.1.1.1";       // IANA IPv4 SSM range: 232.0.0.0/8
const SOURCE = "192.0.2.100";    // Unicast sender IP literal (non-loopback)
const PORT = 12345;

const socket = new UDPSocket({
  localAddress: "0.0.0.0",
  localPort: PORT,
  multicastAllowAddressSharing: true,
});

const { readable, multicastController } = await socket.opened;
if (!multicastController) {
  throw new Error("direct-sockets-multicast policy not available");
}

await multicastController.joinGroup(GROUP, { sourceAddress: SOURCE });

// Runtime feature detection: on Chrome < 158 (without SSM), sourceAddress is
// ignored and joinedGroups contains a plain string instead of a MulticastMembership.
const ssmActive = multicastController.joinedGroups.some(
  (m) => typeof m !== "string" && m.groupAddress === GROUP && m.sourceAddress === SOURCE
);
if (!ssmActive) {
  await multicastController.leaveGroup(GROUP);
  await socket.close();
  throw new Error("Browser fell back to ASM; SSM is not supported");
}

const reader = readable.getReader();
const decoder = new TextDecoder();
try {
  const { value, done } = await reader.read();
  if (!done && value) {
    console.log("SSM datagram from", value.remoteAddress, decoder.decode(value.data));
  }
} finally {
  reader.releaseLock();
  await multicastController.leaveGroup(GROUP, { sourceAddress: SOURCE });
  await socket.close();
}
Source: Adapted from Multicast explainer and ChromeStatus interop detection note.

Subscribing to multiple SSM sources for one group and inspecting joinedGroups

// Additive SSM joins for the same group (RFC 4604); mixing ASM on "232.1.1.1"
// would reject with InvalidStateError.
await multicastController.joinGroup("232.1.1.1", { sourceAddress: "192.0.2.100" });
await multicastController.joinGroup("232.1.1.1", { sourceAddress: "192.0.2.101" });

for (const entry of multicastController.joinedGroups) {
  if (typeof entry === "string") {
    console.log(`ASM group: ${entry}`);
  } else {
    console.log(`SSM group: ${entry.groupAddress} ← source: ${entry.sourceAddress}`);
  }
}

// Drop only one source; the second SSM subscription remains active.
await multicastController.leaveGroup("232.1.1.1", { sourceAddress: "192.0.2.100" });
Source: WICG Direct Sockets spec; RFC 4604.

Browser compatibility

Support for Source-Specific Multicast in Direct Sockets. BCD has no MulticastController or Direct Sockets entries yet (checked 2026-11-24); figures come from ChromeStatus and vendor standards-positions issues.
BrowserSSM supportEvidence / notes
Chrome (desktop IWAs)158Enabled by default on desktop in ChromeStatus 6208452397498368 (dev trial behind flag from 152). Requires desktop Isolated Web App with direct-sockets-multicast.
Chrome (Android / WebView)Noandroid and webview are null in the ChromeStatus API record; Isolated Web Apps are desktop-only.
EdgeUnknownChromium-based, but IWA and Direct Sockets shipping status in Edge is not recorded in ChromeStatus or BCD.
FirefoxNoNo signal on SSM; Mozilla’s position on the parent Direct Sockets API is negative (mozilla/standards-positions#431).
SafariNoNo signal; WebKit’s Isolated Web Apps position request remains open without a position (WebKit/standards-positions#184).

Test coverage note: ChromeStatus notes no SSM WPT test is landed yet (tracked in crbug 461262401) because the spec rejects loopback sources. Chromium verifies SSM through MulticastControllerSsmTest.* (Blink unit tests), DirectSocketsBoundUdpBrowserTest.*SSM*, ChromeDirectSocketsUdpIsolatedWebAppMulticastTest.*SSM*, UDPSocketTest.JoinSourceGroup*/LeaveSourceGroup*/SSMSourceFilteringMultiNIC*, and Mojo bad-message tests.

Source: ChromeStatus API record (6208452397498368); mozilla/standards-positions#431; WebKit/standards-positions#184.

Security and privacy

Source: ChromeStatus security risks (6208452397498368); Direct Sockets security & privacy self-review; RFC 8815; RFC 4607.

Specifications

SpecificationSection
WICG Direct Sockets API (Community Group Draft)MulticastGroupOptions, MulticastMembership & MulticastController
IETF RFC 4607Source-Specific Multicast for IP
IETF RFC 4604Using IGMPv3 and MLDv2 for Source-Specific Multicast
IETF RFC 8815Deprecating Any-Source Multicast (ASM) for Interdomain Multicast

see also