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
@@ -68,25 +68,34 @@ The output of the program should look like:
68
68
```
69
69
> node 1.js
70
70
connected to QmWpvkKm6qHLhoxpWrTswY6UMNWDyn8hN265Qp9ZYvgS82
71
-
node2 received: Bird bird bird, bird is the word!
72
71
node1 received: Bird bird bird, bird is the word!
73
-
node2 received: Bird bird bird, bird is the word!
74
72
node1 received: Bird bird bird, bird is the word!
75
73
```
76
74
77
-
You can change the pubsub `emitSelf` option if you don't want the publishing node to receive its own messages.
75
+
You can change the pubsub `emitSelf` option if you want the publishing node to receive its own messages.
78
76
79
77
```JavaScript
80
78
constdefaults= {
81
79
config: {
82
80
pubsub: {
83
81
enabled:true,
84
-
emitSelf:false
82
+
emitSelf:true
85
83
}
86
84
}
87
85
}
88
86
```
89
87
88
+
The output of the program should look like:
89
+
90
+
```
91
+
> node 1.js
92
+
connected to QmWpvkKm6qHLhoxpWrTswY6UMNWDyn8hN265Qp9ZYvgS82
93
+
node1 received: Bird bird bird, bird is the word!
94
+
node2 received: Bird bird bird, bird is the word!
95
+
node1 received: Bird bird bird, bird is the word!
96
+
node2 received: Bird bird bird, bird is the word!
97
+
```
98
+
90
99
## 2. Future work
91
100
92
101
libp2p/IPFS PubSub is enabling a whole set of Distributed Real Time applications using CRDT (Conflict-Free Replicated Data Types). It is still going through heavy research (and hacking) and we invite you to join the conversation at [research-CRDT](https://github.com/ipfs/research-CRDT). Here is a list of some of the exciting examples:
0 commit comments