~ubuntu-branches/ubuntu/trusty/websockify/trusty-updates

« back to all changes in this revision

Viewing changes to docs/notes

  • Committer: Package Import Robot
  • Author(s): Thomas Goirand
  • Date: 2013-02-23 01:22:51 UTC
  • Revision ID: package-import@ubuntu.com-20130223012251-3qkk1n1p93kb3j87
Tags: upstream-0.3.0+dfsg1
ImportĀ upstreamĀ versionĀ 0.3.0+dfsg1

Show diffs side-by-side

added added

removed removed

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