HostResolver class
A utility class to resolve and cache host addresses.
Provides caching of DNS lookups for improved performance and reduces redundant lookups.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkAddressesCacheTimeout(
Duration cacheTimeout) → bool - Checks if the address cache has exceeded the specified timeout.
-
clearAddressesCache(
) → void - Clears the cached addresses and updates the cache timestamp.
-
lookupAddress(
String hostname) → FutureOr< List< InternetAddress> > -
Resolves the IP addresses for the given
hostname
, using cache if available. -
lookupAddressImpl(
String hostname) → Future< List< InternetAddress> > -
Performs the actual DNS lookup for the given
hostname
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited