Skip to content

feat(transports/unix-stream): add #6056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nabijaczleweli
Copy link

@nabijaczleweli nabijaczleweli commented Jun 11, 2025

Description

This allows dialling with and listening on AF_UNIX/SOCK_STREAM sockets.

Ripped 100% off transports/tcp, as in I cp -r tcp unix-streamed it.

Uses proposed encoding from multiformats/multiaddr#174 (comment)

Notes & open questions

I called the empty tag enum UnixStrm due to a name collision. I don't know what the purpose of it is anyway, but.

As for the encoding, I hope to move it entirely into multiaddr; transports/tcp has

Ok(SocketAddr::new(ipv4.into(), port)),

and

fn ip_to_multiaddr(ip: IpAddr, port: u16) -> Multiaddr {
    Multiaddr::empty().with(ip.into()).with(Protocol::Tcp(port))
}

so the same thing should be available once that lands in multiaddr.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates ‒ I don't see a root entry in transports/tcp so I've left it empty

@nabijaczleweli nabijaczleweli force-pushed the master branch 2 times, most recently from cf4a285 to 7474677 Compare June 11, 2025 23:45
@nabijaczleweli nabijaczleweli changed the title transports/unix-stream: add feat(transports/unix-stream): add Jun 11, 2025
@nabijaczleweli nabijaczleweli force-pushed the master branch 4 times, most recently from 19d5dd4 to eebc01c Compare June 12, 2025 00:24
Ripped 100% off transports/tcp

Uses proposed encoding from multiformats/multiaddr#174 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant