We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider url network addresses like:
tcp4://127.0.0.1:1234 udp4://10.20.30.40:5060 ws://1.2.3.4:5678 tcp6://[1fff:0:a88:85a3::ac1f]:8001
How best to binary pack them? Is there a standard for this? These should be storable in 7 bytes for IPv4 (not 20), and 19 bytes for ipv6 (not 35).
If not, perhaps:
<1 byte proto><4 or 16 byte ip><2 byte port>
Or, if we want encapsulation generality:
(<1 byte proto><n byte addr>)+ <1 byte ipv4 code><4 byte ipv4 addr><1 byte udp code><2 byte udp port> <1 byte ipv6 code><16 byte ipv6 addr><1 byte tcp code><2 byte tcp port>
Which is nice, because it stacks well.
Back-translating with a better hierarchical approach (let's not get too crazy now...) gives us:
(/<addr str code>/<addr str rep>)+ /ip4/<ipv4 str addr>/udp/<udp int port> /ip6/<ipv6 str addr>/tcp/<tcp int port>
Rather than:
udp4://<ipv4 addr>:<udp port> tcp6://[<ipv6 addr>]:<tcp port>
The text was updated successfully, but these errors were encountered:
Bittorrent just concats ip + port: https://github.com/bencevans/node-compact2string It doesn't handle protocol at all, try both tcp + udp.
Sorry, something went wrong.
Fleshed out the node api: https://github.com/jbenet/node-multiaddr
Implemented + published on npm.
No branches or pull requests
Consider url network addresses like:
How best to binary pack them? Is there a standard for this? These should be storable in 7 bytes for IPv4 (not 20), and 19 bytes for ipv6 (not 35).
If not, perhaps:
Or, if we want encapsulation generality:
Which is nice, because it stacks well.
Back-translating with a better hierarchical approach (let's not get too crazy now...) gives us:
Rather than:
The text was updated successfully, but these errors were encountered: