mirror_novnc/docs/notes
Solly Ross 6940936ffc WIP: Switch to Pako for zlib
This commit introduces an alternate implementation of the zlib
decompressor based on Pako (https://github.com/nodeca/pako).
2015-08-06 14:47:03 -04:00

24 lines
831 B
Plaintext

Some implementation notes:
There is an included flash object (web-socket-js) that is used to
emulate websocket support on browsers without websocket support
(currently only Chrome has WebSocket support).
Javascript doesn't have a bytearray type, so what you get out of
a WebSocket object is just Javascript strings. Javascript has UTF-16
unicode strings and anything sent through the WebSocket gets converted
to UTF-8 and vice-versa. So, one additional (and necessary) function
of websockify is base64 encoding/decoding what is sent to/from the
browser.
Building web-socket-js emulator:
cd include/web-socket-js/flash-src
mxmlc -static-link-runtime-shared-libraries WebSocketMain.as
Rebuilding inflator.js
- Download pako from npm
- Install browserify using npm
- browserify utils/inflator.partial.js -o include/inflator.js