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

Allow multiple simultaneous connections to the same peer #912

Closed
tomaka opened this issue Feb 3, 2019 · 4 comments
Closed

Allow multiple simultaneous connections to the same peer #912

tomaka opened this issue Feb 3, 2019 · 4 comments
Assignees
Labels
difficulty:moderate priority:important The changes needed are critical for libp2p, or are blocking another project

Comments

@tomaka
Copy link
Member

tomaka commented Feb 3, 2019

Right now, in order to simplify the implementations of NetworkBehaviour, we only have allow connection per peer ID.
Allowing multiple connections would, in my opinion, considerably increase the difficulty of implementing this trait. If we provide helpers for NetworkBehaviour, though, we could allow multiple connections per peer.

Note that we should have ways to properly identify each connection. Having multiple connections shouldn't be implicit.

@tomaka
Copy link
Member Author

tomaka commented Feb 27, 2019

Allowing multiple connections would, in my opinion, considerably increase the difficulty of implementing this trait. If we provide helpers for NetworkBehaviour, though, we could allow multiple connections per peer.

I just realized that is not necessarily true. We can tell the behaviour that "connected" means "connected for the first time", and "disconnected" means "zero connections remaining".
There could be either one NodeHandler for all the connections, or one NodeHandler per connection, I'm not sure.

@tomaka tomaka added priority:important The changes needed are critical for libp2p, or are blocking another project and removed priority:oneday labels Jan 14, 2020
@tomaka
Copy link
Member Author

tomaka commented Jan 14, 2020

Bumping to "important". See paritytech/substrate#4272 for context.

@romanb
Copy link
Contributor

romanb commented Mar 16, 2020

This is now in libp2p-core, but libp2p-swarm does not yet permit explicitly creating multiple connections per peer. I guess this ticket should stay open until libp2p-swarm fully "embraces" the notion of multiple connections per peer?

@romanb
Copy link
Contributor

romanb commented Mar 31, 2020

Considered closed with #1519.

@romanb romanb closed this as completed Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:moderate priority:important The changes needed are critical for libp2p, or are blocking another project
Projects
None yet
Development

No branches or pull requests

2 participants