Computer scienceBackendNode.jsCore ConceptsInternal modulesFile system module

Read stream

Pause stream

Report a typo

Take a look at the code snippet below.

readStream.on('data', function(chunk) {
    console.log('Received %d bytes of data.', chunk.length);
    readStream.pause();
    setTimeout(function(){
        readStream.resume();
    }, 2000);
});

How many seconds does the read stream pause before resuming again?

Enter a number
___

Create a free account to access the full topic