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

feat: Add webtransport component #271

Merged
merged 2 commits into from
Sep 20, 2022
Merged

feat: Add webtransport component #271

merged 2 commits into from
Sep 20, 2022

Conversation

MarcoPolo
Copy link
Contributor

This adds the webtransport protocol here

@@ -346,6 +346,13 @@ describe('variants', () => {
expect(addr.toString()).to.equal(str)
})

it('webtransport', () => {
const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/udp/4001/quic/webtransport'
Copy link
Member

Choose a reason for hiding this comment

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

Is WebTransport always ipv6? If not, please add a ipv4 test as well to make future selves grateful to current selves.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honest question, does this matter? Is it possible to get parsing failure if an earlier protocol is different? My understanding is as far as this library is concerned it doesn't care if the multiaddr is valid or not. It just parses the multiaddr into parts.

Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to get parsing failure if an earlier protocol is different?

It's hard to say for sure now without a test and impossible to say for the future.

IPv4 is likely to be the most common input so it seems reasonable to have a test that exercises it, which would also then be consistent with the other tests in the file.

Copy link
Member

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

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

LGTM, just needs an ipv4 test alongside the ipv6 one.

@achingbrain achingbrain merged commit 210f156 into master Sep 20, 2022
@achingbrain achingbrain deleted the marco/webtransport branch September 20, 2022 09:51
github-actions bot pushed a commit that referenced this pull request Sep 20, 2022
## [10.5.0](v10.4.3...v10.5.0) (2022-09-20)

### Features

* Add webtransport component ([#271](#271)) ([210f156](210f156))
@github-actions
Copy link

🎉 This PR is included in version 10.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants