To receive pushed streams on the client, set a listener for the 'stream' event on the ClientHttp2Session:

    1. const http2 = require('http2');
    2. const client = http2.connect('http://localhost');
    3. client.on('stream', (pushedStream, requestHeaders) => {
    4. pushedStream.on('push', (responseHeaders) => {
    5. // Process response headers
    6. });
    7. pushedStream.on('data', (chunk) => { /* handle pushed data */ });
    8. });
    9. const req = client.request({ ':path': '/' });