Open jbenet opened 10 years ago
Bittorrent just concats ip + port: https://github.com/bencevans/node-compact2string It doesn't handle protocol at all, try both tcp + udp.
Fleshed out the node api: https://github.com/jbenet/node-multiaddr
Implemented + published on npm.
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: