Automattic/engine.io-parser — pull request #36 by cvlchinet (2014-11-20 22:47:03+00:00)
Title: Patch

I am working with binary data in the browser and – as far as I can see – I can receive binary data which comes as an object { base64: true, data: base64Data }.

BUT there is no way to do the same to send binary data. Sending binary data strictly requires an ArrayBuffer which is not available in older browsers.

I propose to introduce the same concept for sending binary data as for receiving binary data.
Sending an object { base64: true, data: base64Data } should send the data with binary flag to the wire.
This would allow older browsers to work binary. No need to modify server code nor client code. Only the
engine.io-parser needs a small modification.

This PR would resolve https://github.com/Automattic/engine.io-parser/issues/35.

It adds the proposed way to send binary data for old browsers, including test.
Personally tested on IE8. It should support all browsers that https://github.com/feross/buffer supports too.

Any change to get this integrated? Personally it would make engine.io the best socket library available because
of its comprehensive binary support.

Thanks.