Unfortunately, last time I tried to write tests for Unix sockets, I started triggering kernel panics in Windows. Maybe the situation has improved since then?
It has been improved. As part of the provision of AF_UNIX support for DBus on Windows https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/391 there are corresponding test cases for AF_UNIX, which run without problems on a native Windows.