-
Notifications
You must be signed in to change notification settings - Fork 111
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
add a number to websockets #20
Conversation
@whyrusleeping I'm confused. go-ipfs uses I want to make sure that we are using the same protocol name and number https://github.com/jbenet/js-multiaddr/blob/master/src/protocols.js#L44 |
477 0 websockets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please use V
instead of 0
? As discussed before websocket addresses can have variable length, and this would make it much easier later on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I heard from @whyrusleeping, @jbenet proposed that ws
means 'no path' and wsn
represents a websockets addr with paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this written down somewhere? Cause we should add these things to the multiaddr spec first before changing implementations all over the place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 % agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I heard from @whyrusleeping, @jbenet proposed that ws means 'no path' and wsn represents a websockets addr with paths.
wait, i thought it was:
ws
is path without a number telling you long the path should be (/ws/foo/bar/baz
) -- cannot encapsulatewsn
is a path with a number telling the number of path components (/ws/3/foo/bar/baz
) -- can encapsulate
we could also do:
ws16
a base16 (hex) encoded path or something/ws/2f666f6f2f6261722f62617a0a
orws32
orws58
-- can encapsulate, variable length but not variable components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yes, +1 on getting this written down properly in multiaddr spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having ws
mean "path, but not encapsulated" makes it next to useless for us. Ipfs can't use a multiaddr that it cant encapsulate. The only distinction that makes sense is for ws
to mean "No path" and wsn
to be the number thing as we said.
Closing this as we've moved to using zero-length |
No description provided.