I'm using the ws module for a WebSocket server in nodejs. On the server side, I have a Uint8Array that I send to the client using code very much like this,
var data = new Uint8Array([1, 2, 3, 4, 5]); clientSock.send(data, { binary: true }); However, on the client side (both the latest Chrome and Firefox), the data is recieved as a Blob object. I know I can process this back into a Uint8Array using the FileReader API. But I want to receive it as an ArrayBuffer in the first place. How can I do this?