Skip to content

PingKit 0.9.0

Latest

Choose a tag to compare

@gewill gewill released this 27 Sep 19:51
be85db2

PingKit 0.9.0 adds local send-attempt timing for diagnostics (#43, #44).

New API

  • Pinger.attemptTiming(at:) returns a one-based attempt number, the 16-bit ICMP sequence, a ContinuousClock.Instant, and the interval since the previous attempt. Successful sends and local send failures both count as attempts.
  • The timestamp is captured immediately before the local socket send call and uses the same clock as PingConfiguration.sendDeadline. Delayed PingResponse consumption therefore does not inflate the measured send interval.
  • Records are bounded to the latest bufferLimits.events attempts. A missing record returns nil; consumers should treat that interval as unknown. The attempt number distinguishes records when the wire sequence wraps.

The timestamp describes the user-space send boundary. It does not prove when the kernel transmitted a packet or when a remote target received it. Existing PingResponse cases and ordinary Ping behavior are unchanged.

Validation

The strict ICMP macOS test run passed 92 library tests and 9 CLI tests with IPv4 and IPv6 loopback available. macOS, iOS, and Linux Swift 6.0/6.1 CI passed for #44 and the 0.9.0 release commit. DocC built locally. The library remains dependency-free, with macOS 13+, iOS 16+, and Linux support. This release contains source archives only; Pingman background continuity has its own device acceptance gate (#87).