-
Notifications
You must be signed in to change notification settings - Fork 501
Closed
Labels
kind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing feature
Description
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
})
]
})
Metadata
Metadata
Assignees
Labels
kind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing feature