Skip to content

PingKit 0.6.1

Choose a tag to compare

@gewill gewill released this 14 Jul 15:34
· 15 commits to main since this release

PingKit 0.6.1 fixes how send failures are counted so they show up as
packet loss, matching ping(8).

Fix

0.6.0 excluded send failures from transmitted, so a mid-run network
drop showed 0% loss in statistics() — the outage vanished from the
aggregate for consumers that only read the summary.

A failed send now counts toward transmitted (not received), so it
surfaces as packet loss, the same way ping(8) does. The .sendFailed
event still carries the errno, so consumers can still tell "never
sent" from "sent but lost".

This was motivated by a live-disconnect capture of system ping(8): the
sendto: No route to host probes stayed in the transmit tally, ending
26 transmitted / 17 received / 34.6% loss.

Impact

Behavior change, no API break. Same disconnect scenario:

  • 0.6.0 → 17 transmitted, 0% loss
  • 0.6.1 → failed probes counted, loss reflects the real gap

Verified: pingkit-cli 8.8.8.8 -6 -c 3 now reports
3 transmitted, 0 received, 100% loss (exit 2). 72 tests pass on macOS,
iOS Simulator, and Linux Swift 6.0 / 6.1.