File: notes

package info (click to toggle)
websockify 0.6.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 744 kB
  • ctags: 574
  • sloc: python: 1,541; ansic: 1,037; ruby: 533; cs: 142; sh: 122; makefile: 31
file content (24 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 wsproxy 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

Building release tarball:
    - not really necessary since tagged revision can be downloaded
      from github as tarballs

    git archive --format=tar --prefix=websockify-${WVER}/ v${WVER} > websockify-${WVER}.tar
    gzip websockify-${WVER}.tar