I am relaying the results stream through socket.io-stream. When the socket.io client disconnects, what is the correct way to .close() .disconnect() .destroy() the dsteem client connection? The dsteem stream functions don't appear to have any methods to disconnect or hang-up.
io.on('connection', function(socket) {
ss(socket).on('ready', function(){
var client = new dsteem.Client('https://api.steemit.com');
var opsStream = client.blockchain.getOperationsStream();
opsStream.pipe(es.map(function(block, callback) {
ss(socket).emit('sending', block);
callback(null, util.inspect(block, {colors: true, depth: null}) + '\n')
}))//.pipe(process.stdout);
});
socket.on('disconnect', function(){
/*
how to disconnect the getOperationsStream() ??
*/
console.log('User Disconnected');
});
});
RE: dsteem playground