Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 of0
? As discussed before websocket addresses can have variable length, and this would make it much easier later onThere 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' andwsn
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.
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 encapsulatewe could also do:
ws16
a base16 (hex) encoded path or something/ws/2f666f6f2f6261722f62617a0a
orws32
orws58
-- can encapsulate, variable length but not variable componentsThere 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 forws
to mean "No path" andwsn
to be the number thing as we said.