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})
factory
Creates a new InternetAddress from a numeric address or a file path. [...]
InternetAddress.fromRawAddress(Uint8List rawAddress, {@Since("2.8") InternetAddressType? type})
factory
Creates a new InternetAddress from the provided raw address bytes. [...]

Properties

addressString
read-only
The numeric address of the host. [...]
hashCodeint
read-only, inherited
The hash code for this object. [...]
hostString
read-only
The host used to lookup the address. [...]
isLinkLocalbool
read-only
Whether the scope of the InternetAddress is a link-local.
isLoopbackbool
read-only
Whether the InternetAddress is a loopback address.
isMulticastbool
read-only
Whether the scope of the InternetAddress is multicast.
rawAddressUint8List
read-only
The raw address of this InternetAddress. [...]
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.
typeInternetAddressType
read-only
The address family of the InternetAddress.

Methods

noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]
reverse() → Future<InternetAddress>
Performs a reverse DNS lookup on this address [...]
toString() → String
inherited
A string representation of this object. [...]

Operators

operator ==(Object other) → bool
inherited
The equality operator. [...]

Static Properties

ANY_IP_V4InternetAddress
@Deprecated("Use anyIPv4 instead"), read-only
ANY_IP_V6InternetAddress
@Deprecated("Use anyIPv6 instead"), read-only
anyIPv4InternetAddress
read-only
IP version 4 any address. [...]
anyIPv6InternetAddress
read-only
IP version 6 any address. [...]
LOOPBACK_IP_V4InternetAddress
@Deprecated("Use loopbackIPv4 instead"), read-only
LOOPBACK_IP_V6InternetAddress
@Deprecated("Use loopbackIPv6 instead"), read-only
loopbackIPv4InternetAddress
read-only
IP version 4 loopback address. [...]
loopbackIPv6InternetAddress
read-only
IP version 6 loopback address. [...]

Static Methods

lookup(String host, {InternetAddressType type = InternetAddressType.any}) → Future<List<InternetAddress>>
Looks up the addresses of a host. [...]
tryParse(String address) → InternetAddress?
Attempts to parse address as a numeric address. [...]

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-io/InternetAddress-class.html