isLinkLocal property

  1. @override
bool get isLinkLocal
override

Whether the scope of the InternetAddress is a link-local.

Implementation

@override
bool get isLinkLocal {
  final rawAddress = this.rawAddress;
  if (type == InternetAddressType.IPv6) {
    // First 10 bits is 0xFE80
    return rawAddress[0] == 0xFE && ((0x80 | 0x40) & rawAddress[1]) == 0x80;
  }
  return false;
}