Skip to content

RFC: Untie Connection from UnixStream

Marc-André Lureau requested to merge elmarco/zbus:dyn-socket into main

zbus::Connection (the sync one), wraps UnixStream. For historical reasons, the code assumes a bit too much that this is the underlying transport. After some discussion on irc, the consensus is hiding the raw & handshake details, so we can refactor the code more easily (the alternative to maintail legacy would be a bit too costly for no known users, and we don't want to maintain that kind of low-level API anyway).

Switch it to wrap a dyn Socket instead, and allow various transports to be implemented.

(azync::Connection<S> is generic over S: Socket, which is probably a fair choice and doesn't suffer the same limitation, even if there isn't much gain on making a type generic over a IO object type imho)

Merge request reports