Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

feat: Unix domain sockets #208

Merged
merged 10 commits into from
Sep 14, 2022
Merged

Conversation

saul-jb
Copy link
Contributor

@saul-jb saul-jb commented Sep 8, 2022

This PR adds the functionality to handle UNIX domain sockets.

  • This works with plain /unix multiaddresses but is unable to handle p2p encapsulated addresses (/unix/.../p2p/...) due to ambiguity. Because of this it causes errors when attempting to use /unix addresses in js-libp2p because it appends the /p2p address.
  • On Windows this uses named pipes instead.

Despite the fact that it does not work with /unix addresses in js-libp2p directly, this still remains useful and is needed in other projects like js-libp2p-daemon.

This PR relates to issue #132.

@achingbrain achingbrain changed the title Unix domain sockets feat: Unix domain sockets Sep 12, 2022
@saul-jb
Copy link
Contributor Author

saul-jb commented Sep 12, 2022

To get this working on windows systems I have had to use named pipes instead of unix domain sockets, see: https://nodejs.org/api/net.html#identifying-paths-for-ipc-connections.

@achingbrain achingbrain merged commit 223f79b into libp2p:master Sep 14, 2022
@achingbrain
Copy link
Member

Thanks!

github-actions bot pushed a commit that referenced this pull request Sep 14, 2022
## [3.1.0](v3.0.8...v3.1.0) (2022-09-14)

### Features

* Unix domain sockets ([#208](#208)) ([223f79b](223f79b)), closes [#132](#132)
@github-actions
Copy link

🎉 This PR is included in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants