Skip to content

Instantly share code, notes, and snippets.

View kevinsimper's full-sized avatar

Kevin Simper kevinsimper

View GitHub Profile
var stream = require('stream');
var timer = new stream.Readable({
read: function() {
var self = this;
console.log('called');
setTimeout(function() {
if(!timer.isPaused()){
self.push('ping\n');