-
-
Save yrong/cb6a0ace805079af221d2df703c2b3a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var msgSend; | |
var counter = 0 | |
setInterval(function(){ | |
msgSend = new Buffer(counter.toString()); | |
ipfs.pubsub.publish(topic, msgSend, (err) => { | |
if (err) { | |
throw err | |
} | |
// msg was broadcasted | |
}) | |
counter++ | |
}, 3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment