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

swarm/: Rename ProtocolsHandler to ConnectionHandler #2527

Merged
merged 4 commits into from
Feb 21, 2022

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Feb 18, 2022

A ProtocolsHandler, now ConnectionHandler, handels a connection, not
a protocol. Thus the name CONNECTIONHandler is more appropriate.

Next to the rename of ProtocolsHandler this commit renames the mod protocols_handler to mod handler. Finally all combinators (e.g.
ProtocolsHandlerSelect) are renamed appropriately.


I find the name ConnectionHandler more intuitive, both for me familiar with the library, as well as for newcomers while explaining the concepts of the library. What do folks think?

A `ProtocolsHandler`, now `ConnectionHandler`, handels a connection, not
a protocol. Thus the name `CONNECTIONHandler` is more appropriate.

Next to the rename of `ProtocolsHandler` this commit renames the `mod
protocols_handler` to `mod handler`. Finally all combinators (e.g.
`ProtocolsHandlerSelect`) are renamed appropriately.
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

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

I think it is a good change but it will take some getting used to.

I wonder if there is a way of making this change in a more graceful way. I guess users can just start with a search-replace and fix up remaining errors. Should be easy enough!

@mxinden
Copy link
Member Author

mxinden commented Feb 19, 2022

I guess users can just start with a search-replace and fix up remaining errors. Should be easy enough!

👍 I think an additional call-out in the changelog should be good enough.

@mxinden mxinden merged commit fd2be38 into libp2p:master Feb 21, 2022
umgefahren pushed a commit to umgefahren/rust-libp2p that referenced this pull request Mar 8, 2024
A `ProtocolsHandler`, now `ConnectionHandler`, handels a connection, not
a protocol. Thus the name `CONNECTIONHandler` is more appropriate.

Next to the rename of `ProtocolsHandler` this commit renames the `mod
protocols_handler` to `mod handler`. Finally all combinators (e.g.
`ProtocolsHandlerSelect`) are renamed appropriately.
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.

2 participants