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
{{ message }}
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ TODO: add explanation for registrar!
50
50
constPubsub=require('libp2p-pubsub')
51
51
52
52
classPubsubImplementationextendsPubsub {
53
-
constructor(peerInfo, registrar, options= {}) {
53
+
constructor({ peerInfo, registrar, ...options })
54
54
super({
55
55
debugName:'libp2p:pubsub',
56
56
multicodecs:'/pubsub-implementation/1.0.0',
@@ -90,7 +90,7 @@ The following specified API should be the base API for a pubsub implementation o
90
90
91
91
### Start
92
92
93
-
Start the pubsub subsystem. The protocol will be registered to `libp2p`, which will notify about peers being connected and disconnected with the protocol.
93
+
Starts the pubsub subsystem. The protocol will be registered to `libp2p`, which will result in pubsub being notified when peers who support the protocol connect/disconnect to `libp2p`.
94
94
95
95
#### `pubsub.start()`
96
96
@@ -102,7 +102,7 @@ Start the pubsub subsystem. The protocol will be registered to `libp2p`, which w
102
102
103
103
### Stop
104
104
105
-
Stop the pubsub subsystem. The protocol will be unregistered to`libp2p`, which will remove all listeners for the protocol and the streams with other peers will be closed.
105
+
Stops the pubsub subsystem. The protocol will be unregistered from`libp2p`, which will remove all listeners for the protocol and the established connections will be closed.
106
106
107
107
#### `pubsub.stop()`
108
108
@@ -169,7 +169,7 @@ Get the list of topics which the peer is subscribed to.
169
169
170
170
### Get Peers Subscribed to a topic
171
171
172
-
Get a list of the peer-ids that are subscribed to one topic.
172
+
Get a list of the [PeerId](https://github.com/libp2p/js-peer-id) strings that are subscribed to one topic.
0 commit comments