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

use the transport.Upgrader interface #1277

Merged
merged 1 commit into from
Jan 4, 2022
Merged

Conversation

marten-seemann
Copy link
Contributor

No description provided.

@marten-seemann marten-seemann mentioned this pull request Jan 2, 2022
69 tasks
hostType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return h },
networkType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return h.Network() },
muxType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return u.Muxer },
securityType: func(h host.Host, u *tptu.Upgrader, cg connmgr.ConnectionGater) interface{} { return u.Secure },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the muxType and the securityType. All tests are passing, but I'm not sure this means that this is actually safe.

Copy link
Contributor

Choose a reason for hiding this comment

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

i dont see why not.

Copy link
Member

Choose a reason for hiding this comment

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

IIRC, the idea was that some transports may not need the entire upgrader, and may just want a multiplexer etc. But honestly, we might as well give them an upgrader.

@marten-seemann marten-seemann merged commit 9add9a3 into master Jan 4, 2022
@marten-seemann marten-seemann deleted the upgrader-interface branch January 4, 2022 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants