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
Updates the libp2p init args to accept an object of service
factory functions that can use internal libp2p components.
The returned libp2p object has a `.services` key that corresponds
to the service factory keys.
Copy file name to clipboardExpand all lines: doc/LIMITS.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ We can also limit the number of connections in a "pending" state. These connecti
29
29
All fields are optional. The default values are defined in [src/connection-manager/index.ts](https://github.com/libp2p/js-libp2p/blob/master/src/connection-manager/index.ts) - please see that file for the current values.
30
30
31
31
```ts
32
-
const node =awaitcreateLibp2pNode({
32
+
const node =awaitcreateLibp2p({
33
33
connectionManager: {
34
34
/**
35
35
* The total number of connections allowed to be open at one time
@@ -69,7 +69,7 @@ To prevent individual peers from opening multiple connections to a node, an `inb
69
69
All fields are optional. The default values are defined in [src/connection-manager/index.ts](https://github.com/libp2p/js-libp2p/blob/master/src/connection-manager/index.ts) - please see that file for the current values.
70
70
71
71
```ts
72
-
const node =awaitcreateLibp2pNode({
72
+
const node =awaitcreateLibp2p({
73
73
connectionManager: {
74
74
/**
75
75
* A remote peer may attempt to open up to this many connections per second,
@@ -93,7 +93,7 @@ These settings are done on a per-muxer basis, please see the README of the relev
93
93
All fields are optional. The default values are defined in [@libp2p/mplex/src/mplex.ts](https://github.com/libp2p/js-libp2p-mplex/blob/master/src/mplex.ts) - please see that file for the current values.
All fields are optional. The default values are defined in [@chainsafe/libp2p-yamux/src/config.ts](https://github.com/ChainSafe/js-libp2p-yamux/blob/master/src/config.ts) - please see that file for the current values.
134
134
135
135
```ts
136
-
const node =awaitcreateLibp2pNode({
136
+
const node =awaitcreateLibp2p({
137
137
muxers: [
138
138
yamux({
139
139
/**
@@ -186,7 +186,7 @@ The [@libp2p/tcp](https://github.com/libp2p/js-libp2p-tcp) transport allows addi
186
186
All fields are optional. The full list of options is defined in [@libp2p/tcp/src/index.ts](https://github.com/libp2p/js-libp2p-tcp/blob/master/src/index.ts) - please see that file for more details.
0 commit comments