-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary support #123
Comments
We had a discussion about it, and we decided not to add binary support for web-socket-js: #89 In short:
|
I agree that web-socket.js should be compatible with native WebSocket without adding custom syntax. Typed arrays I'm using the first link from pdf.js successfully. This could be very useful for projects such as noVNC. |
Yeah, it should workaround the first issue, but the second issue remains. |
Issue 2 is the fault of browsers that implemented unstable versions of the spec with unprefixed object. |
WebSocket support sending and receiving binary data.
Is it possible that web-socket-js will handle this transparently for the user?
In case of a binary message, it will base64 encode it, will call send_binary to so the flash socket will decode it and send it as binary.
The flash socket will do the same in the opposite direction. When it will receive a binary packet, it will base64 encode it and call onbinarymessage on js.
the binaryType attribute will tell the js to use a blob or array buffer for the binary message.
Makes sense?
Thanks
The text was updated successfully, but these errors were encountered: