InternetAddress class
An internet address or a Unix domain address.
This object holds an internet address. If this internet address is the result of a DNS lookup, the address also holds the hostname used to make the lookup. An Internet address combined with a port number represents an endpoint to which a socket can connect or a listening socket can bind.
Constructors
-
InternetAddress(String address,
{@Since("2.8") InternetAddressType type} ) -
Creates a new InternetAddress from a numeric address or a file path. [...]
factory
-
InternetAddress.fromRawAddress(Uint8List rawAddress,
{@Since("2.8") InternetAddressType type} ) -
Creates a new InternetAddress from the provided raw address bytes. [...]
factory
Properties
- address → String
-
The numeric address of the host. [...]
read-only
- host → String
-
The host used to lookup the address. [...]
read-only
- isLinkLocal → bool
-
Returns true if the InternetAddresss scope is a link-local.
read-only
- isLoopback → bool
-
Returns true if the InternetAddress is a loopback address.
read-only
- isMulticast → bool
-
Returns true if the InternetAddresss scope is multicast.
read-only
- rawAddress → Uint8List
-
The raw address of this InternetAddress. [...]
read-only
- type → InternetAddressType
-
The address family of the InternetAddress.
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
reverse(
) → Future< InternetAddress> - Perform a reverse DNS lookup on this address [...]
-
noSuchMethod(
Invocation invocation ) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other ) → bool -
The equality operator. [...]
inherited
Static Properties
- ANY_IP_V4 → InternetAddress
-
@Deprecated("Use anyIPv4 instead"), read-only
- ANY_IP_V6 → InternetAddress
-
@Deprecated("Use anyIPv6 instead"), read-only
- anyIPv4 → InternetAddress
-
IP version 4 any address. Use this address when listening on
all adapters IP addresses using IP version 4 (IPv4).
read-only
- anyIPv6 → InternetAddress
-
IP version 6 any address. Use this address when listening on
all adapters IP addresses using IP version 6 (IPv6).
read-only
- LOOPBACK_IP_V4 → InternetAddress
-
@Deprecated("Use loopbackIPv4 instead"), read-only
- LOOPBACK_IP_V6 → InternetAddress
-
@Deprecated("Use loopbackIPv6 instead"), read-only
- loopbackIPv4 → InternetAddress
-
IP version 4 loopback address. Use this address when listening on
or connecting to the loopback adapter using IP version 4 (IPv4).
read-only
- loopbackIPv6 → InternetAddress
-
IP version 6 loopback address. Use this address when listening on
or connecting to the loopback adapter using IP version 6 (IPv6).
read-only
Static Methods
-
lookup(
String host, {InternetAddressType type: InternetAddressType.any} ) → Future< List< InternetAddress> > -
Lookup a host, returning a Future of a list of
InternetAddresss. If
type
is InternetAddressType.any, it will lookup both IP version 4 (IPv4) and IP version 6 (IPv6) addresses. Iftype
is either InternetAddressType.IPv4 or InternetAddressType.IPv6 it will only lookup addresses of the specified type. The order of the list can, and most likely will, change over time.