isLoopback
TypeScriptgetIsLoopback($self: IPv6Address): booleanSwift declarationvar isLoopback: Bool { get }Is the looback address "::1"
struct · iOS 12.0+ · SDK 27.1
struct IPv6AddressIPv6Address Base type to hold an IPv6 address and convert between strings and raw bytes. Note that an IPv6 address may be scoped to an interface.
getIsLoopback($self: IPv6Address): booleanSwift declarationvar isLoopback: Bool { get }Is the looback address "::1"
getIsLinkLocal($self: IPv6Address): booleanSwift declarationvar isLinkLocal: Bool { get }Is a link-local address
getIsMulticast($self: IPv6Address): booleanSwift declarationvar isMulticast: Bool { get }Is multicast
getIsIPv4Mapped($self: IPv6Address): booleanSwift declarationvar isIPv4Mapped: Bool { get }Is an IPv4 mapped address such as "::ffff:1.2.3.4"
getIsUniqueLocal($self: IPv6Address): booleanSwift declaration@backDeployed(before: macOS 14, iOS 17, watchOS 10, tvOS 17)
var isUniqueLocal: Bool { get }Is unique local address
get linkLocalNodes(): IPv6AddressSwift declarationstatic let linkLocalNodes: IPv6AddressIPv6 all link local nodes multicast
getMulticastScope($self: IPv6Address): (IPv6Address_Scope) | nullSwift declarationvar multicastScope: IPv6Address.Scope? { get }Returns the multicast scope
get nodeLocalNodes(): IPv6AddressSwift declarationstatic let nodeLocalNodes: IPv6AddressIPv6 all node local nodes multicast
getDebugDescription($self: IPv6Address): stringSwift declarationvar debugDescription: String { get }A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.
get linkLocalRouters(): IPv6AddressSwift declarationstatic let linkLocalRouters: IPv6AddressIPv6 all link local routers multicast
getIsIPv4Compatabile($self: IPv6Address): booleanSwift declarationvar isIPv4Compatabile: Bool { get }Is an IPv4 compatible address
get any(): IPv6AddressSwift declarationstatic let any: IPv6AddressIPv6 any address
getIsAny($self: IPv6Address): booleanSwift declarationvar isAny: Bool { get }Is the Any address "::0"
getAsIPv4($self: IPv6Address): (IPv4Address) | nullSwift declarationvar asIPv4: IPv4Address? { get }For IPv6 addresses that are IPv4 mapped, returns the IPv4 address - Returns: nil unless the IPv6 address was mapped or compatible, in which case the IPv4 address is returned.
getIs6to4($self: IPv6Address): booleanSwift declarationvar is6to4: Bool { get }Is a 6to4 IPv6 address
get loopback(): IPv6AddressSwift declarationstatic let loopback: IPv6AddressIPv6 loopback address
getRawValue($self: IPv6Address): ArrayBufferSwift declarationvar rawValue: Data { get }Fetch the raw address (sixteen bytes)
get broadcast(): IPv6AddressSwift declarationstatic let broadcast: IPv6AddressIPv6 broadcast address
getInterface($self: IPv6Address): (NWInterface) | nullSwift declarationlet interface: NWInterface?The interface the address is scoped to, if any.
init(rawValue: ArrayBuffer, interface_?: (NWInterface) | null): (IPv6Address) | nullSwift declarationinit?(_ rawValue: Data, _ interface: NWInterface? = nil)Create an IPv6 from a raw 16 byte value and optional interface - Parameter rawValue: A 16 byte IPv6 address - Parameter interface: An optional interface the address is scoped to. Defaults to nil. - Returns: nil unless the raw data contained an IPv6 address
init40195(string: string): (IPv6Address) | nullSwift declarationinit?(_ string: String)Create an IPv6 address from a string literal such as "fe80::1%lo0" or "2001:DB8::5" This function does not perform hostname resolution. This is similar to calling getaddrinfo with AI_NUMERICHOST. - Parameter string: An IPv6 address literal string. - Returns: nil unless the string contained an IPv6 literal
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
IPv6Address
The iOS SDK compiler rejected this binding: type 'IPv6Address' does not conform to protocol 'RawRepresentable'