InternetAddress.fromRawAddress constructor

InternetAddress.fromRawAddress(
  1. Uint8List rawAddress,
  2. {@Since("2.8") InternetAddressType? type}
)

Creates a new InternetAddress from the provided raw address bytes.

If the type is InternetAddressType.IPv4, the rawAddress must have length 4. If the type is InternetAddressType.IPv6, the rawAddress must have length 16. If the type is InternetAddressType.unix, the rawAddress must be a valid UTF-8 encoded file path.

If type is omitted, the rawAddress must have a length of either 4 or 16, in which case the type defaults to InternetAddressType.IPv4 or InternetAddressType.IPv6 respectively.

Implementation

external factory InternetAddress.fromRawAddress(Uint8List rawAddress,
    {@Since("2.8") InternetAddressType? type});

© 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/InternetAddress.fromRawAddress.html