isLoopback
TypeScriptgetIsLoopback($self: IPv4Address): booleanSwift declarationvar isLoopback: Bool { get }Indicates if this IPv4 address is loopback (127.0.0.1)
struct · iOS 12.0+ · SDK 27.1
struct IPv4AddressIPv4Address Base type to hold an IPv4 address and convert between strings and raw bytes. Note that an IPv4 address may be scoped to an interface.
getIsLoopback($self: IPv4Address): booleanSwift declarationvar isLoopback: Bool { get }Indicates if this IPv4 address is loopback (127.0.0.1)
getIsLinkLocal($self: IPv4Address): booleanSwift declarationvar isLinkLocal: Bool { get }Indicates if this IPv4 address is link-local
getIsMulticast($self: IPv4Address): booleanSwift declarationvar isMulticast: Bool { get }Indicates if this IPv4 address is multicast
get allHostsGroup(): IPv4AddressSwift declarationstatic let allHostsGroup: IPv4AddressThe IPv4 all hosts multicast group
get allReportsGroup(): IPv4AddressSwift declarationstatic let allReportsGroup: IPv4AddressThe IPv4 all reports multicast group for ICMPv3 membership reports
get allRoutersGroup(): IPv4AddressSwift declarationstatic let allRoutersGroup: IPv4AddressThe IPv4 all routers multicast group
getDebugDescription($self: IPv4Address): 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 any(): IPv4AddressSwift declarationstatic let any: IPv4AddressThe IPv4 any address used for listening
get loopback(): IPv4AddressSwift declarationstatic let loopback: IPv4AddressThe IPv4 loopback address
getRawValue($self: IPv4Address): ArrayBufferSwift declarationvar rawValue: Data { get }Fetch the raw address (four bytes)
get broadcast(): IPv4AddressSwift declarationstatic let broadcast: IPv4AddressThe IPv4 broadcast address used to broadcast to all hosts
getInterface($self: IPv4Address): (NWInterface) | nullSwift declarationlet interface: NWInterface?The interface the address is scoped to, if any.
get mdnsGroup(): IPv4AddressSwift declarationstatic let mdnsGroup: IPv4AddressThe IPv4 multicast DNS group. (Note: Use the dns_sd APIs instead of creating your own responder/resolver)
init(rawValue: ArrayBuffer, interface_?: (NWInterface) | null): (IPv4Address) | nullSwift declarationinit?(_ rawValue: Data, _ interface: NWInterface? = nil)Create an IPv4 address from a 4-byte data. Optionally specify an interface. - Parameter rawValue: The raw bytes of the IPv4 address, must be exactly 4 bytes or init will fail. - Parameter interface: An optional network interface to scope the address to. Defaults to nil. - Returns: An IPv4Address or nil if the Data parameter did not contain an IPv4 address.
init46997(string: string): (IPv4Address) | nullSwift declarationinit?(_ string: String)Create an IPv4 address from an address literal string. This function does not perform host name to address resolution. This is the same as calling getaddrinfo and using AI_NUMERICHOST. - Parameter string: An IPv4 address literal string such as "127.0.0.1", "169.254.8.8%en0". - Returns: An IPv4Address or nil if the string parameter did not contain an IPv4 address literal.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
IPv4Address
The iOS SDK compiler rejected this binding: type 'IPv4Address' does not conform to protocol 'RawRepresentable'