Skip to content

Conversation

gaboose
Copy link

@gaboose gaboose commented Feb 5, 2016

I can add new protocols from outside of this library with a line like

ma.AddProtocol(ma.Protocol{42, -1, "dns", ma.CodeToVarint(42)})

But it fails when I call NewMultiaddr("/dns/google.com"), because it doesn't know how to encode "google.com". What if you encode unknown protocol addresses of variable length as bare strings?

This change makes this library work.

@jbenet
Copy link
Member

jbenet commented Sep 16, 2016

we'd have to length prefix them, see how i proposed unix recently

marten-seemann pushed a commit to marten-seemann/go-multiaddr that referenced this pull request Feb 25, 2021
replace gx instructions with note about gomod
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.

2 participants