Antoine
Antoine

Reputation: 920

Sending binary data from browser

I wanted to know what I must do for sending data in binary type from client to server?

I am using Chrome 14, and when I send an ArrayBuffer in the client application, I receive a frame with the opcode set to opText and a string as frame data "[object ArrayBuffer]"` in the server application.

What should I do?

Upvotes: 3

Views: 934

Answers (1)

pimvdb
pimvdb

Reputation: 154858

You should download the latest nightly build since it has only been implemented in Chrome 16 (currently that's the developer channel). You could also download Chrome Canary.

Currently, in Chrome 14/15, you can only send strings and as such, an ArrayBuffer is converted to a string: someArrayBuffer.toString() === "[object ArrayBuffer]".

It has been implemented in WebKit revision 94482, but Chrome 14 (build 835) only includes up to WebKit revision 91698.

Upvotes: 3

Related Questions