notes 831 B

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