You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dialing in libp2p can be configured to limit the rate of dialing, and how long dials are allowed to take. The dialer configuration object should have the following properties:
| Name | Type | Description |
|------|------|-------------|
| maxParallelDials |`number`| How many multiaddrs we can dial in parallel. |
| maxAddrsToDial |`number`| How many multiaddrs is the dial allowed to dial for a single peer. |
| maxDialsPerPeer |`number`| How many multiaddrs we can dial per peer, in parallel. |
| dialTimeout |`number`| Second dial timeout per peer in ms. |
| resolvers |`object`| Dial [Resolvers](https://github.com/multiformats/js-multiaddr/blob/master/src/resolvers/index.js) for resolving multiaddrs |
| addressSorter |`(Array<Address>) => Array<Address>`| Sort the known addresses of a peer before trying to dial. |
| startupReconnectTimeout |`number`| When a node is restarted, we try to connect to any peers marked with the `keep-alive` tag up until to this timeout in ms is reached (default: 60000) |
The below configuration example shows how the dialer should be configured, with the current defaults:
As ever, just trying to reduce the number of moving parts that are exposed to consumers.
libp2p.dial calls connectionManager.openConnection, which calls the dialler.
Internal components also call connectionManager.openConnection.
Thus, the connection manager is in charge of opening and closing connections - if you call the dialler directly then the connection manager is no longer in charge of managing connections, so, if you like, the dialler is an internal component of the connection manager, consequently the dialling related settings are passed to the connection manager and the dialler is just an internal implementation detail.
see
js-libp2p/doc/CONFIGURATION.md
Lines 546 to 585 in 47c6e8f
However, Libp2pInit.dialer doesn't exist:
The text was updated successfully, but these errors were encountered: