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 for alternative Connection Managers #1581

Closed
maschad opened this issue Feb 7, 2023 · 1 comment
Closed

Allow for alternative Connection Managers #1581

maschad opened this issue Feb 7, 2023 · 1 comment
Assignees
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@maschad
Copy link
Member

maschad commented Feb 7, 2023

Currently Libp2p enforces the DefaultConnectionManager for managing all connections. Whilst it's quite configurable, there are particular use cases in which it is a bit inflexible and a consumer may want to have complete control over the process of opening and closing connections as well as pruning and dialling peers. This could be enabled by passing a module which implements the connection-manager-interface to the Libp2p instance, otherwise it would default to the DefaultConnectionManager with the default config.

const libp2p = await createLibp2p({
  transports: [
    tcp()
  ],
 connectionManager: [
	myConnectionManager({
 		maxConnections: Infinity,
    	minConnections: 0,
    	pollInterval: 2000
          // other configurations
	})
 ]
})
@maschad maschad added need/triage Needs initial labeling and prioritization need/analysis Needs further analysis before proceeding kind/enhancement A net-new feature or improvement to an existing feature labels Feb 7, 2023
@maschad maschad assigned maschad and unassigned maschad Feb 14, 2023
@maschad maschad removed need/analysis Needs further analysis before proceeding need/triage Needs initial labeling and prioritization labels Feb 20, 2023
maschad added a commit to maschad/js-libp2p that referenced this issue Feb 22, 2023
maschad added a commit to maschad/js-libp2p that referenced this issue Feb 26, 2023
@maschad
Copy link
Member Author

maschad commented Apr 25, 2023

Closed in favour of #1563 which will allow a consumer to define arbitrary services that have access to libp2p internal components

@maschad maschad closed this as completed Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant