ResolverStatus
IP.swift:27enum ResolverStatusenum ResolverStatusimport SwiftGodotFramework to write Godot Game Extensions using the Swift Programming Language.
class IPInternet protocol (IP) support functions such as DNS resolution.
case noneDNS hostname resolver status: No status.
case waitingDNS hostname resolver status: Waiting.
case doneDNS hostname resolver status: Done.
case errorDNS hostname resolver status: Error.
static let resolverInvalidId: IntInvalid ID constant. Returned if resolverMaxQueries is exceeded.
static let resolverMaxQueries: IntMaximum number of concurrent DNS resolver queries allowed, resolverInvalidId is returned if exceeded.
static var shared: IPThe shared instance of this class
static func clearCache(hostname: String = "") Removes all of a hostname’s cached references. If no hostname is given, all cached IP addresses are removed.
static func eraseResolveItem(id: Int32) Removes a given item id from the queue. This should be used to free a queue after it has completed to enable more queries to happen.
static func getLocalAddresses() -> PackedStringArray Returns all the user’s current IPv4 and IPv6 addresses as an array.
static func getLocalInterfaces() -> VariantCollection<GDictionary> Returns all network adapters as an array.
static func getResolveItemAddress(id: Int32) -> String Returns a queued hostname’s IP address, given its queue id. Returns an empty string on error or if resolution hasn’t happened yet (see getResolveItemStatus(id:)).
static func getResolveItemAddresses(id: Int32) -> GArray Returns resolved addresses, or an empty array if an error happened or resolution didn’t happen yet (see getResolveItemStatus(id:)).
static func getResolveItemStatus(id: Int32) -> IP.ResolverStatus Returns a queued hostname’s status as a ResolverStatus constant, given its queue id.
static func resolveHostname(host: String, ipType: IP.GType = .any) -> String Returns a given hostname’s IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the IP/Type constant given as ipType.
static func resolveHostnameAddresses(host: String, ipType: IP.GType = .any) -> PackedStringArray Resolves a given hostname in a blocking way. Addresses are returned as an GArray of IPv4 or IPv6 addresses depending on ipType.
static func resolveHostnameQueueItem(host: String, ipType: IP.GType = .any) -> Int32 Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the IP/Type constant given as ipType. Returns the queue ID if successful, or resolverInvalidId on error.
override class var godotClassName: StringName { get }enum GTypeprotocol CaseIterableA type that provides a collection of all of its values.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol RawRepresentable<RawValue>A type that can be converted to and from an associated raw value.
init?(rawValue: Int64) var debugDescription: String { get }A textual representation of this instance, suitable for debugging
var hashValue: Int { get }static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)