Ip4Address.fromBytes constructor

Ip4Address.fromBytes(
  1. List<int> bytes,
  2. int index
)

Implementation

factory Ip4Address.fromBytes(List<int> bytes, int index) {
  return Ip4Address.fromUint32(
    ((0xFF & bytes[index]) << 24) |
        ((0xFF & bytes[index + 1]) << 16) |
        ((0xFF & bytes[index + 2]) << 8) |
        (0xFF & bytes[index + 3]),
  );
}