-
+
src/identify/index.js
@@ -2257,7 +2277,7 @@ instance if one is not provided in options.
-
+
src/peer-routing.js
@@ -2364,7 +2384,7 @@ instance if one is not provided in options.
-
+
src/content-routing.js
@@ -2481,7 +2501,7 @@ Once a content router succeeds, iteration will stop.
-
+
src/content-routing.js
@@ -2556,7 +2576,7 @@ a provider of the given key.
-
+
src/content-routing.js
@@ -2671,7 +2691,7 @@ a provider of the given key.
-
+
src/content-routing.js
@@ -2779,7 +2799,7 @@ Times out after 1 minute by default.
-
+
src/content-routing.js
@@ -2894,7 +2914,7 @@ Times out after 1 minute by default.
-
+
src/pubsub.js
@@ -2976,7 +2996,7 @@ Times out after 1 minute by default.
-
+
src/pubsub.js
@@ -3050,7 +3070,7 @@ Times out after 1 minute by default.
-
+
src/pubsub.js
@@ -3131,7 +3151,7 @@ Times out after 1 minute by default.
-
+
src/pubsub.js
@@ -3191,7 +3211,7 @@ Times out after 1 minute by default.
-
+
src/pubsub.js
@@ -3264,7 +3284,7 @@ Times out after 1 minute by default.
-
+
src/get-peer-info.js
@@ -3347,7 +3367,7 @@ the peer will be updated in the
PeerStore
.
-
+
src/get-peer-info.js
@@ -3429,7 +3449,7 @@ the
libp2p
PeerRouter will be used to attempt to find the peer.
-
+
src/connection-manager/index.js
@@ -3598,7 +3618,7 @@ the
libp2p
PeerRouter will be used to attempt to find the peer.
-
+
src/connection-manager/index.js
@@ -3651,7 +3671,7 @@ only event loop and connection limits will be monitored.
-
+
src/connection-manager/index.js
@@ -3703,7 +3723,7 @@ only event loop and connection limits will be monitored.
-
+
src/connection-manager/index.js
@@ -3778,7 +3798,7 @@ will be disconnected first.
-
+
src/connection-manager/index.js
@@ -3843,7 +3863,7 @@ will be disconnected first.
-
+
src/connection-manager/index.js
@@ -3908,7 +3928,7 @@ will be disconnected first.
-
+
src/circuit/index.js
@@ -4005,7 +4025,7 @@ will be disconnected first.
-
+
src/circuit/index.js
@@ -4113,7 +4133,7 @@ will be disconnected first.
-
+
src/circuit/index.js
@@ -4194,7 +4214,7 @@ will be disconnected first.
-
+
src/circuit/index.js
@@ -4267,7 +4287,7 @@ will be disconnected first.
-
+
src/circuit/listener.js
@@ -4335,7 +4355,7 @@ will be disconnected first.
-
+
src/circuit/listener.js
@@ -4412,7 +4432,7 @@ will be disconnected first.
-
+
src/circuit/listener.js
@@ -4476,7 +4496,7 @@ will be disconnected first.
-
+
src/circuit/listener.js
@@ -4559,7 +4579,7 @@ be dialed over TCP rather than any other transport
-
+
src/circuit/circuit/hop.js
@@ -4674,7 +4694,7 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
+
src/circuit/circuit/utils.js
@@ -4747,7 +4767,7 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
+
src/circuit/circuit/utils.js
@@ -4821,7 +4841,7 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
+
src/circuit/circuit/stream-handler.js
@@ -4922,7 +4942,7 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
+
src/circuit/circuit/stream-handler.js
@@ -4982,7 +5002,7 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
+
src/circuit/circuit/stream-handler.js
@@ -5048,7 +5068,7 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
+
src/circuit/circuit/stream-handler.js
@@ -5108,7 +5128,7 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
+
src/circuit/circuit/stream-handler.js
@@ -5168,7 +5188,7 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
+
src/dialer/index.js
@@ -5354,7 +5374,7 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
+
src/dialer/index.js
@@ -5401,22 +5421,23 @@ peer. A new, virtual, connection will be created between the two via the relay.<
-
Connects to the first success of a given list of Multiaddr
. addrs
should
-include the id of the peer being dialed, it will be used for encryption verification.
+
Connects to a given PeerId
or Multiaddr
by dialing all of its known addresses.
+The dial to the first address that is successfully able to upgrade a connection
+will be used.
-
connectToMultiaddr(addrs: (
Array<Multiaddr> | Multiaddr), options:
object?):
Promise<Connection>
+
connectToPeer(peer: (PeerInfo | Multiaddr), options:
object?):
Promise<Connection>
@@ -5433,8 +5454,9 @@ include the id of the peer being dialed, it will be used for encryption verifica
-
addrs ((Array<Multiaddr> | Multiaddr))
-
+
peer ((PeerInfo | Multiaddr))
+ The peer to dial
+
@@ -5509,23 +5531,20 @@ include the id of the peer being dialed, it will be used for encryption verifica
-
Connects to a given PeerInfo
or PeerId
by dialing all of its known addresses.
-The dial to the first address that is successfully able to upgrade a connection
-will be used.
-
-
connectToPeer(peerId: PeerId, options:
object?):
Promise<Connection>
+
+
_createDialTarget(peer: any)
@@ -5542,44 +5561,192 @@ will be used.
- peerId (PeerId)
- The remote peer id to dial
+ peer (any)
+
+
+
+
+
+
+
+
+
Properties
+
+
+
+
+
+
addrs (Array<Multiaddr>)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _createPendingDial(dialTarget: any, options: any)
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
-
options (object?
- = {}
)
+
options (any)
-
-
-
-
-
-
-
- Name |
- Description |
-
-
-
-
-
- options.signal AbortSignal?
- |
- An AbortController signal
- |
-
+
+
+
+
+
+ Properties
+
+
+
+ dialRequest (DialRequest)
+
+
+
+
+
+ controller (TimeoutController)
+
+
+
+
+
+
+
+ destroy (function (): void)
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the given peer
into a PeerInfo
or Multiaddr
.
+
+ getDialable(peer: (PeerInfo | PeerId | Multiaddr |
string)): (PeerInfo | Multiaddr)
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
peer ((PeerInfo | PeerId | Multiaddr | string))
+
+
@@ -5591,7 +5758,7 @@ will be used.
Returns
-
Promise<Connection>
:
+
(PeerInfo | Multiaddr)
:
@@ -5624,7 +5791,7 @@ will be used.
-
+
src/dialer/dial-request.js
@@ -5733,7 +5900,7 @@ all other dials in the request will be cancelled.
-
+
src/dialer/dial-request.js
@@ -5830,7 +5997,7 @@ all other dials in the request will be cancelled.
-
+
src/metrics/index.js
@@ -5942,7 +6109,7 @@ all other dials in the request will be cancelled.
-
+
src/metrics/index.js
@@ -5995,7 +6162,7 @@ will be ignored.
-
+
src/metrics/index.js
@@ -6048,7 +6215,7 @@ Once
stop
is called,
start
must be called to resume st
-
+
src/metrics/index.js
@@ -6108,7 +6275,7 @@ Once
stop
is called,
start
must be called to resume st
-
+
src/metrics/index.js
@@ -6168,7 +6335,7 @@ Once
stop
is called,
start
must be called to resume st
-
+
src/metrics/index.js
@@ -6242,7 +6409,7 @@ is a live peer, or in the disconnected peer LRU cache.
-
+
src/metrics/index.js
@@ -6302,7 +6469,7 @@ is a live peer, or in the disconnected peer LRU cache.
-
+
src/metrics/index.js
@@ -6375,7 +6542,7 @@ is a live peer, or in the disconnected peer LRU cache.
-
+
src/metrics/index.js
@@ -6442,7 +6609,7 @@ be stopped and moved to an LRU for temporary retention.
-
+
src/metrics/index.js
@@ -6518,7 +6685,7 @@ placeholder stats will be merged with the existing stats.
-
+
src/metrics/index.js
@@ -6646,7 +6813,7 @@ with the placeholder string returned from here, and the known
PeerId
-
+
src/metrics/index.js
@@ -6728,7 +6895,7 @@ and returned.
-
+
src/metrics/old-peers.js
@@ -6801,7 +6968,7 @@ and returned.
-
+
src/metrics/stats.js
@@ -6879,7 +7046,7 @@ and returned.
-
+
src/metrics/stats.js
@@ -6945,7 +7112,7 @@ should only need to be called if
Stats.stop
was previously called,
-
+
src/metrics/stats.js
@@ -7010,7 +7177,7 @@ timer.
-
+
src/metrics/stats.js
@@ -7074,7 +7241,7 @@ timer.
-
+
src/metrics/stats.js
@@ -7138,7 +7305,7 @@ timer.
-
+
src/metrics/stats.js
@@ -7202,7 +7369,7 @@ timer.
-
+
src/metrics/stats.js
@@ -7296,7 +7463,7 @@ current Timestamp, then resets the update timer.
-
+
src/transport-manager.js
@@ -7394,7 +7561,7 @@ current Timestamp, then resets the update timer.
-
+
src/transport-manager.js
@@ -7475,7 +7642,7 @@ current Timestamp, then resets the update timer.
-
+
src/transport-manager.js
@@ -7527,7 +7694,7 @@ current Timestamp, then resets the update timer.
-
+
src/transport-manager.js
@@ -7608,7 +7775,7 @@ current Timestamp, then resets the update timer.
-
+
src/transport-manager.js
@@ -7668,7 +7835,7 @@ current Timestamp, then resets the update timer.
-
+
src/transport-manager.js
@@ -7728,7 +7895,7 @@ current Timestamp, then resets the update timer.
-
+
src/transport-manager.js
@@ -7801,7 +7968,7 @@ current Timestamp, then resets the update timer.
-
+
src/transport-manager.js
@@ -7866,7 +8033,7 @@ current Timestamp, then resets the update timer.
-
+
src/transport-manager.js
@@ -7932,7 +8099,7 @@ If a transport has any running listeners, they will be closed.
-
+
src/transport-manager.js
@@ -7985,7 +8152,7 @@ If any listeners are running, they will be closed.
-
+
src/upgrader.js
@@ -8144,7 +8311,7 @@ If any listeners are running, they will be closed.
-
+
src/upgrader.js
@@ -8221,7 +8388,7 @@ If any listeners are running, they will be closed.
-
+
src/upgrader.js
@@ -8306,7 +8473,7 @@ If any listeners are running, they will be closed.
-
+
src/upgrader.js
@@ -8468,7 +8635,7 @@ If any listeners are running, they will be closed.
-
+
src/upgrader.js
@@ -8545,7 +8712,7 @@ If any listeners are running, they will be closed.
-
+
src/upgrader.js
@@ -8630,7 +8797,7 @@ If any listeners are running, they will be closed.
-
+
src/peer-store/index.js
@@ -8687,7 +8854,7 @@ If any listeners are running, they will be closed.
-
+
src/peer-store/index.js
@@ -8738,7 +8905,7 @@ If any listeners are running, they will be closed.
▸
-
put(peerInfo)
+
put(peerInfo, options = {silent:false})
@@ -8748,7 +8915,7 @@ If any listeners are running, they will be closed.
-
+
src/peer-store/index.js
@@ -8756,9 +8923,12 @@ If any listeners are running, they will be closed.
Stores the peerInfo of a new peer.
-If already exist, its info is updated.
+If already exist, its info is updated. If
silent
is set to
+true, no 'peer' event will be emitted. This can be useful if you
+are already in the process of dialing the peer. The peer is technically
+known, but may not have been added to the PeerStore yet.
-
put(peerInfo: PeerInfo): PeerInfo
+
put(peerInfo: PeerInfo, options:
object?): PeerInfo
@@ -8781,6 +8951,40 @@ If already exist, its info is updated.
+
+
+
options (object?
+ = {silent:false}
)
+
+
+
+
+
+
+
+
+
+
+ Name |
+ Description |
+
+
+
+
+
+ options.silent boolean?
+ |
+ (Default=false)
+ |
+
+
+
+
+
+
+
+
+
@@ -8826,7 +9030,7 @@ If already exist, its info is updated.
-
+
src/peer-store/index.js
@@ -8903,7 +9107,7 @@ If already exist, its info is updated.
-
+
src/peer-store/index.js
@@ -8980,7 +9184,7 @@ If already exist, its info is updated.
-
+
src/peer-store/index.js
@@ -9058,7 +9262,7 @@ If already exist, its info is updated.
-
+
src/peer-store/index.js
@@ -9136,7 +9340,7 @@ If already exist, its info is updated.
-
+
src/peer-store/index.js
@@ -9214,7 +9418,7 @@ If already exist, its info is updated.
-
+
src/peer-store/index.js
@@ -9281,7 +9485,7 @@ If already exist, its info is updated.
▸
-
multiaddrsForPeer(peerId)
+
multiaddrsForPeer(peer)
@@ -9291,16 +9495,16 @@ If already exist, its info is updated.
-
Returns the known multiaddrs for a given PeerId
+
Returns the known multiaddrs for a given PeerInfo
-
multiaddrsForPeer(peerId: PeerId):
Array<Multiaddr>
+
multiaddrsForPeer(peer: PeerInfo):
Array<Multiaddr>
@@ -9317,7 +9521,7 @@ If already exist, its info is updated.
- peerId (PeerId)
+ peer (PeerInfo)
@@ -9376,7 +9580,7 @@ If already exist, its info is updated.
-
+
src/registrar.js
@@ -9471,7 +9675,7 @@ If already exist, its info is updated.
-
+
src/registrar.js
@@ -9533,7 +9737,7 @@ TODO: this should be handled by connectionManager
-
+
src/registrar.js
@@ -9594,7 +9798,7 @@ TODO: this should be handled by connectionManager
-
+
src/registrar.js
@@ -9650,7 +9854,7 @@ TODO: this should be handled by connectionManager
-
+
src/registrar.js
@@ -9736,7 +9940,7 @@ TODO: this should live in the ConnectionManager
-
+
src/registrar.js
@@ -9830,7 +10034,7 @@ TODO: this should live in the ConnectionManager
-
+
src/registrar.js
@@ -9907,7 +10111,7 @@ TODO: this should live in the ConnectionManager
-
+
src/registrar.js
@@ -9985,7 +10189,7 @@ TODO: this should live in the ConnectionManager
-
+
src/registrar.js
@@ -10071,7 +10275,7 @@ TODO: this should live in the ConnectionManager
-
+
src/ping/index.js
@@ -10152,7 +10356,7 @@ TODO: this should live in the ConnectionManager
-
+
src/ping/index.js
@@ -10217,7 +10421,7 @@ TODO: this should live in the ConnectionManager
-
+
src/ping/index.js
@@ -10282,7 +10486,7 @@ TODO: this should live in the ConnectionManager
-
+
src/identify/index.js
@@ -10388,7 +10592,7 @@ TODO: this should live in the ConnectionManager
-
+
src/identify/index.js
@@ -10439,7 +10643,7 @@ TODO: this should live in the ConnectionManager
-
+
src/identify/index.js
@@ -10490,7 +10694,7 @@ TODO: this should live in the ConnectionManager
-
+
src/identify/index.js
@@ -10563,7 +10767,7 @@ TODO: this should live in the ConnectionManager
-
+
src/identify/index.js
@@ -10628,7 +10832,7 @@ TODO: this should live in the ConnectionManager
-
+
src/identify/index.js
@@ -10703,7 +10907,7 @@ an error will be thrown.
-
+
src/identify/index.js
@@ -10816,7 +11020,7 @@ an error will be thrown.
-
+
src/identify/index.js
@@ -10890,7 +11094,7 @@ with the provided
multiaddrs
-
+
src/identify/index.js
@@ -10964,7 +11168,7 @@ with the provided
protocols
-
+
src/identify/index.js