An internet 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.

Static Properties

ANY_IP_V4 InternetAddress

IP version 4 any address. Use this address when listening on all adapters IP addresses using IP version 4 (IPv4).

read-only
ANY_IP_V6 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

IP version 4 loopback address. Use this address when listening on or connecting to the loopback adapter using IP version 4 (IPv4).

read-only
LOOPBACK_IP_V6 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. If type is either InternetAddressType.IP_V4 or InternetAddressType.IP_V6 it will only lookup addresses of the specified type. The order of the list can, and most likely will, change over time.

Properties

address String

The numeric address of the host. For IPv4 addresses this is using the dotted-decimal notation. For IPv6 it is using the hexadecimal representation.

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
host String

The host used to lookup the address. If there is no host associated with the address this returns the numeric 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 List<int>

Get the raw address of this InternetAddress. The result is either a 4 or 16 byte long list. The returned list is a copy, making it possible to change the list without modifying the InternetAddress.

read-only
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited
type InternetAddressType

read / write

Constructors

InternetAddress(String address)

Creates a new InternetAddress from a numeric address.

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

noSuchMethod is invoked when users invoke a non-existent method on an object. The name of the method and the arguments of the invocation are passed to noSuchMethod in an Invocation. If noSuchMethod returns a value, that value becomes the result of the original invocation.

inherited
reverse() Future<InternetAddress>

Perform a reverse dns lookup on the address, creating a new InternetAddress where the host field set to the result.

toString() String

Returns a string representation of this object.

inherited