Skip to content
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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion protocols.csv
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ code size name
421 V ipfs
480 0 http
443 0 https
444 10 onion
477 0 websockets
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 % agree.

Copy link
Member

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 encapsulate
  • wsn 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 or ws32 or ws58 -- can encapsulate, variable length but not variable components

Copy link
Member

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

Copy link
Member

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.

444 10 onion