Skip to content

rtcompat: Second attempt at AF_UNIX support

Nick Mathewson requested to merge nickm/arti:abstract-socket-v2 into main

This is a replacement for !2425 (closed), based on conversations on that ticket and on #1152 (closed).

This time, instead of jumping straight for an AbstractAddr implementation, I've started by generalizing TcpProvider into a NetStreamProvider, parameterized on address type. This enables the existence of NetStreamProvider<unix::SocketAddr>, and lets us provide a blanket implementation for NetStreamProvider<AbstractAddr>, which avoids problems in the previous design when replacing a TcpProvider. (See discussion on !2425 (closed) for even more rationale.)

This branch also has far less copy-and-paste code than the previous version, and manages to remove some complexity by deleting the never-actually-needed TcpListener::accept() method.

Marking this as a draft because we haven't settled on a name for AbstractAddr yet; see discussion on #1152 (closed).

Closes #1152 (closed).

Merge request reports