MCPcopy Create free account
hub / github.com/Effect-TS/effect / isMulticast

Function isMulticast

packages/effect/src/net/NetAddress.ts:1442–1446  ·  view source on GitHub ↗
(self: A)

Source from the content-addressed store, hash-verified

1440 * @since 4.0.0
1441 */
1442export const isMulticast = <A extends IpAddress | MacAddress>(self: A): self is MulticastAddress<A> => {
1443 if (isMacAddress(self)) return isMacMulticast(self)
1444 if (isIpv4Address(self)) return (ipv4Value(self) >>> 28) === 0xe
1445 return (ipv6Words(self).w0 >>> 24) === 0xff
1446}
1447
1448/**
1449 * Returns `true` for the IPv4 limited broadcast address `255.255.255.255` or

Callers 1

isUnicastFunction · 0.85

Calls 5

isMacAddressFunction · 0.85
isMacMulticastFunction · 0.85
isIpv4AddressFunction · 0.85
ipv4ValueFunction · 0.85
ipv6WordsFunction · 0.85

Tested by

no test coverage detected