InternetAddress constructor

InternetAddress(
  1. String address,
  2. {@Since("2.8") InternetAddressType type}
)

Creates a new InternetAddress from a numeric address or a file path.

If type is InternetAddressType.IPv4, address must be a numeric IPv4 address (dotted-decimal notation). If type is InternetAddressType.IPv6, address must be a numeric IPv6 address (hexadecimal notation). If type is InternetAddressType.unix, address must be a a valid file path. If type is omitted, address must be either a numeric IPv4 or IPv6 address and the type is inferred from the format.

To create a Unix domain address, type should be InternetAddressType.unix and address should be a string.

Implementation

external factory InternetAddress(String address,
    {@Since("2.8") InternetAddressType type});