@ai-ecoverse/slicc-kernel 1.27.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6444,8 +6444,14 @@ function writeAddr(view, ptr, addr) {
6444
6444
  );
6445
6445
  return;
6446
6446
  }
6447
- view.setUint8(ptr, INET4);
6448
6447
  view.setUint16(ptr + 2, addr.port, true);
6448
+ const groups = ipv4(addr.host) ? void 0 : ipv6Groups(addr.host);
6449
+ if (groups) {
6450
+ view.setUint8(ptr, INET6);
6451
+ groups.forEach((g, i) => void view.setUint16(ptr + 4 + i * 2, g));
6452
+ return;
6453
+ }
6454
+ view.setUint8(ptr, INET4);
6449
6455
  const octets = ipv4(addr.host) ?? [127, 0, 0, 1];
6450
6456
  octets.forEach((b, i) => void view.setUint8(ptr + 4 + i, b));
6451
6457
  }