stream - Node.js / Knowing if ReadStream.pipe is transfer a data -


i try find way check if pipe freezes or data still piping. have following code:

var downloadstream1 = download1.createreadstream(); var pipeofdownloadclient = downloadstream1.pipe(response); 

i try find event this:

pipeofdownloadclient.on('data', function(data){       logger.info("data piping"); }) 

but when did this, no data piping printed, although data transferred client.

you should check downloadstream1's data event. tell whether or not .pipe still emitting data.

if check pipeofdownloadclient._events have these 3 events: drain, error, , close. no data event.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -