Created
March 31, 2017 22:57
-
-
Save chrismatthieu/e639c2ec475e9ebc7b0fd107ac0ca094 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