2.2.3 • Published 7 years ago

pipelining v2.2.3

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

pipelining

Xhr chunked stream client for the browser and NodeJS

HOW TO USE

front-end

const pipelining = require('pipelining');

const reader = pipelining('/test');

function read() {
  reader.read().then(partial => {
    if (partial.done) {
      return;
    }

    handle(partial.data).then(read);
  });
}

read();

back-end

const pipelining = require('pipelining');
// http handler
function (req, res) {
  res.write(pipelining.pack(1));
  // after several seconds..
  res.write(pipelining.pack({ tom: 'test' }));
  // after 1 min..
  res.end();
}

TODO:

  1. node.js version
  2. headers support
2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

1.2.2

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago