Commit 3100deb
committed
feat(quinn-udp): add runtime probe for Apple fast datapath APIs
Add a fork-based runtime probe to safely detect availability of private
Apple `sendmsg_x`/`recvmsg_x` APIs before using them. These APIs may
crash on unsupported OS versions, so the probe tests them in a child
process and falls back to standard `sendmsg`/`recvmsg` if unavailable.
Key changes:
- Add `probe` module that forks a child to test API availability
- Cache probe result in `OnceLock` for process lifetime
- Split fast path (`send_via_sendmsg_x`/`recv_via_recvmsg_x`) from
slow path (`send_single`/`recv_single`) for runtime dispatch
- Add `prepare_msg_x`/`prepare_recv_x` for `msghdr_x` preparation
- Extract `decode_cmsg` helper to reduce duplication in recv decoding
- Make `decode_recv` generic over `MsgHdr` trait1 parent 8bf6825 commit 3100deb
1 file changed
+389
-92
lines changed
0 commit comments