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(iroh-net)!: Make relay protocol configurable on ClientBuilder instead of defined by the relay url scheme #2446

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

matheus23
Copy link
Member

Description

Details in #2442

Breaking Changes

  • iroh_net::relay::http::ClientBuilder: Added .protocol() function to the builder for choosing whether to connect to the relay via websockets or not

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

matheus23 added 2 commits July 2, 2024 14:57
And remove the unused `Protocol::from_url_scheme` function
@matheus23 matheus23 self-assigned this Jul 2, 2024
@dignifiedquire dignifiedquire added this to the v0.20.0 milestone Jul 2, 2024
@dignifiedquire dignifiedquire changed the title feat(iroh-net): Make relay protocol configurable on ClientBuilder instead of defined by the relay url scheme feat(iroh-net)!: Make relay protocol configurable on ClientBuilder instead of defined by the relay url scheme Jul 2, 2024
@matheus23 matheus23 added this pull request to the merge queue Jul 3, 2024
Merged via the queue into main with commit ab2c7ea Jul 3, 2024
25 of 26 checks passed
@dignifiedquire dignifiedquire deleted the matheus23/client-ws-opt branch July 8, 2024 17:12
Comment on lines +261 to +262
/// Sets whether to connect to the relay via websockets or not.
/// Set to use non-websocket, normal relaying by default.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be great if we could give some guidance here to the user what this means. Why would a user choose websockets? What happens when the server doesn't support it?

As written this is tells you something if you know this feature, but you need to explain the feature to the user because this is the first time they're encountering this and they won't have a clue what to do with this. It's perfectly fine if that means repeating lots of stuff available elsewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right. At the moment I'd say this API is mostly for testing, or maybe if you have an http proxy that blocks http upgrades except for websockets. (Is something like that a thing?)

I'll update the docs ✌️

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

Successfully merging this pull request may close these issues.

3 participants