Javascript has two new binary types: typed arrays (arraybuffers) and Blobs (mostly files).
WebSockets supports sending and receiving typed arrays and blocks.
WebSockets ( WebSocket ).
++, , WebSocket. WebSocket : http://en.wikipedia.org/wiki/Comparison_of_WebSocket_implementations
JavaScript WebSocket - :
ws = new WebSocket("ws://100.101.102.103");
send() , . , (), , ( = 2).
ws.send(myTypedArray);
, :
ws.onmessage = function (evt) {
console.log("Got ws message: " + evt.data);
};
/, onmessage , blob binaryType. , :
ws.binaryType = "blob"; // or "arraybuffer"