Re: WebSocket question

Now that there's ArrayBuffer will a binary protocol be added?
https://developer.mozilla.org/en/JavaScript_typed_arrays/ArrayBuffer

Just need to say you're using the binary protocol in the handshake. Don't need 
length or anything since it would just be a normal TCP stream and someone could 
create their own sub protocol. Been waiting for a binary protocol for a while 
for games. Send would just accept an ArrayBuffer and treat it like an Uint8Array 
probably. If you said you were using a binary protocol then the onmessage 
event.data would just be an ArrayBuffer object. Simple. Please don't make it 
complicated. Don't be like "but people will get confused when their long 
messages are split between multiple onmessage callbacks." It should just be a 
pure TCP stream with no special stuff. That is you could get any amount of bytes 
during a receive just like regular TCP where anything over the MTU is chopped 
up.

Received on Wednesday, 12 January 2011 03:31:23 UTC