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
// Logs the PeerId string and the observed remote multiaddr of each Connection
203
+
}
204
+
}
205
+
```
206
+
184
207
### dial
185
208
186
209
Dials to another peer in the network and establishes the connection.
@@ -191,15 +214,15 @@ Dials to another peer in the network and establishes the connection.
191
214
192
215
| Name | Type | Description |
193
216
|------|------|-------------|
194
-
| peer |[PeerInfo](https://github.com/libp2p/js-peer-info), [PeerId](https://github.com/libp2p/js-peer-id), [multiaddr](https://github.com/multiformats/js-multiaddr), `string`| peer to dial |
217
+
| peer |[PeerInfo](https://github.com/libp2p/js-peer-info), [PeerId][peer-id], [multiaddr](https://github.com/multiformats/js-multiaddr), `string`| peer to dial |
195
218
|[options]|`Object`| dial options |
196
219
|[options.signal]|[`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)| An `AbortSignal` instance obtained from an [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) that can be used to abort the connection before it completes |
197
220
198
221
#### Returns
199
222
200
223
| Type | Description |
201
224
|------|-------------|
202
-
|`Promise<Connection>`| Promise resolves with the [Connection](https://github.com/libp2p/js-interfaces/tree/master/src/connection) instance |
225
+
|`Promise<Connection>`| Promise resolves with the [Connection][connection] instance |
203
226
204
227
#### Example
205
228
@@ -226,7 +249,7 @@ Dials to another peer in the network and selects a protocol to communicate with
226
249
227
250
| Name | Type | Description |
228
251
|------|------|-------------|
229
-
| peer |[PeerInfo](https://github.com/libp2p/js-peer-info), [PeerId](https://github.com/libp2p/js-peer-id), [multiaddr](https://github.com/multiformats/js-multiaddr), `string`| peer to dial |
252
+
| peer |[PeerInfo](https://github.com/libp2p/js-peer-info), [PeerId][peer-id], [multiaddr](https://github.com/multiformats/js-multiaddr), `string`| peer to dial |
230
253
| protocols | `String|Array<String>` | A list of protocols (or single protocol) to negotiate with. Protocols are attempted in order until a match is made. (e.g '/ipfs/bitswap/1.1.0') |
231
254
|[options]|`Object`| dial options |
232
255
|[options.signal]|[`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)| An `AbortSignal` instance obtained from an [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) that can be used to abort the connection before it completes |
@@ -259,7 +282,7 @@ Attempts to gracefully close an open connection to the given peer. If the connec
259
282
260
283
| Name | Type | Description |
261
284
|------|------|-------------|
262
-
| peer |[PeerInfo](https://github.com/libp2p/js-peer-info), [PeerId](https://github.com/libp2p/js-peer-id), [multiaddr](https://github.com/multiformats/js-multiaddr), `string`| peer to hang up |
285
+
| peer |[PeerInfo](https://github.com/libp2p/js-peer-info), [PeerId][peer-id], [multiaddr](https://github.com/multiformats/js-multiaddr), `string`| peer to hang up |
263
286
264
287
#### Returns
265
288
@@ -355,7 +378,7 @@ Iterates over all peer routers in series to find the given peer. If the DHT is e
355
378
356
379
| Name | Type | Description |
357
380
|------|------|-------------|
358
-
| peerId |[`PeerId`](https://github.com/libp2p/js-peer-id)| ID of the peer to find |
381
+
| peerId |[`PeerId`][peer-id]| ID of the peer to find |
359
382
| options |`Object`| operation options |
360
383
| options.timeout |`number`| maximum time the query should run |
0 commit comments