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

Add ConnectionId in Identify events #4980

Open
stormshield-frb opened this issue Dec 5, 2023 · 0 comments · May be fixed by #4981
Open

Add ConnectionId in Identify events #4980

stormshield-frb opened this issue Dec 5, 2023 · 0 comments · May be fixed by #4981

Comments

@stormshield-frb
Copy link
Contributor

Description

Add a field connection_id in protocols/identify/src/behaviour.rs:Event so we can map the received event to the corresponding connection.

Motivation

In order to identify which connection has been used to receive Identify::Event and to react on it, we need to have access to the ConnectionId so that we can have access to the ConnectionInfo of the corresponding connection.

Moreover, for debugging and logging purposes it would be very helpful.

Some events do sometimes have the connection_id field (ping, dht, dctur) but other do not (identify, request_response, ...). Maybe that is something that could be uniformized across behaviours. If so, we would be open to work and participate on this, but it might be a different issue.

Current Implementation

We cannot access the ConnectionId identifying were the Identify event came from.

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

Yes

@stormshield-frb stormshield-frb linked a pull request Dec 5, 2023 that will close this issue
4 tasks
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