PingKit 0.1.0
First release: IPv4 ICMP ping for Swift over unprivileged datagram sockets.
Features
Pingeractor with anAsyncSequenceAPI (for try await response in pinger.responses), plus one-shotPinger.ping(_:)- Configurable interval, timeout, probe count, and payload size
- ICMP error mapping: Destination Unreachable and Time Exceeded are reported per-probe instead of being silently dropped (including a workaround for XNU byte-swapping the quoted IP header of error messages)
ping(8)-style statistics: transmitted/received/loss, min/avg/max/stddev RTT- Strict lifecycle semantics: single consumer, cancellation-aware teardown, idempotent
stop() - Zero runtime dependencies; Swift 6 strict concurrency throughout
ping-clidemo executable- CI-verified on macOS and Linux (real loopback pings on both)
Platforms
macOS 13+ / iOS 16+; Linux best-effort (requires net.ipv4.ping_group_range).
🤖 Generated with Claude Code