Reuse the macOS disconnect prerequisite in the common POSIX path. Proceed only when getpeername positively reports ENOTCONN, retaining the original connect error for connected or indeterminate sockets.
Exercise actual UDP sockets with injected EAFNOSUPPORT and EINVAL results for IPv4 and IPv6, both disconnect entry points, all three binding modes, and still-connected or failed peer-query outcomes.