/Dart 2

parseIPv4Address method

List<int> parseIPv4Address (String host)

Parse the host as an IP version 4 (IPv4) address, returning the address as a list of 4 bytes in network byte order (big endian).

Throws a FormatException if host is not a valid IPv4 address representation.


static List<int> parseIPv4Address(String host) =>
    _parseIPv4Address(host, 0, host.length);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.