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/handler: Inject events via single method #3080

Closed
jxs opened this issue Nov 3, 2022 · 0 comments · Fixed by #3085
Closed

swarm/handler: Inject events via single method #3080

jxs opened this issue Nov 3, 2022 · 0 comments · Fixed by #3085
Assignees

Comments

@jxs
Copy link
Member

jxs commented Nov 3, 2022

Description

Replace the various ConnectionHandler::inject_xxx methods with a single ConnectionHandler::on_event method and a Event enum.

Motivation

Akin to #2832. (see #2832 (comment)) and related to #2854

Are you planning to do it yourself in a pull request?

Yes

@jxs jxs self-assigned this Nov 3, 2022
@mergify mergify bot closed this as completed in #3085 Nov 17, 2022
mergify bot pushed a commit that referenced this issue Nov 17, 2022
Previously, we had one callback for each kind of message that a `ConnectionHandler` would receive from either its `NetworkBehaviour` or the connection itself.

With this patch, we combine these functions, resulting in two callbacks:

- `on_behaviour_event`
- `on_connection_event`

Resolves #3080.
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 a pull request may close this issue.

1 participant