Home | History | Annotate | Download | only in web-socket-js

Lines Matching full:socket

6   http://github.com/gimite/web-socket-ruby/tree/master
7 - Run sample Web Socket server (echo server) in example.com with: (#1)
8 $ ruby web-socket-ruby/samples/echo_server.rb example.com 10081
9 - If your server already provides socket policy file at port 843, modify the file to allow access to port 10081. Otherwise you can skip this step. See below for details.
10 - Publish the web-socket-js directory with your Web server (e.g. put it in ~/public_html).
15 #1: First argument of echo_server.rb means that it accepts Web Socket connection from HTML pages in example.com.
26 -- It's likely an issue of web-socket-js specific configuration (e.g. 3 and 4 below).
28 -- Check "Supported environment" section below. Your browser may not be supported by web-socket-js.
34 3. Make sure you do NOT open your HTML page as local file e.g. file:///.../sample.html. web-socket-js doesn't work on local file. Open it via Web server e.g. http:///.../sample.html.
36 4. If you are NOT using web-socket-ruby as your WebSocket server, you need to place Flash socket policy file on your server. See "Flash socket policy file" section below for details.
38 5. Check if sample.html bundled with web-socket-js works.
55 * Flash socket policy file
57 This implementation uses Flash's socket, which means that your server must provide Flash socket policy file to declare the server accepts connections from Flash.
59 If you use web-socket-ruby available at
60 http://github.com/gimite/web-socket-ruby/tree/master
61 , you don't need anything special, because web-socket-ruby handles Flash socket policy file request. But if you already provide socket policy file at port 843, you need to modify the file to allow access to Web Socket port, because it precedes what web-socket-ruby provides.
63 If you use other Web Socket server implementation, you need to provide socket policy file yourself. See
65 for details and sample script to run socket policy file server. node.js implementation is available here:
66 http://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/transports/flashsocket.js
68 Actually, it's still better to provide socket policy file at port 843 even if you use web-socket-ruby. Flash always try to connect to port 843 first, so providing the file at port 843 makes startup faster.
73 Cookie is sent if Web Socket host is the same as the origin of JavaScript. Otherwise it is not sent, because I don't know way to send right Cookie (which is Cookie of the host of Web Socket, I heard).
75 Note that it's technically possible that client sends arbitrary string as Cookie and any other headers (by modifying this library for example) once you place Flash socket policy file in your server. So don't trust Cookie and other headers if you allow connection from untrusted origin.
82 The AS3 Socket class doesn't implement this mechanism, which renders it useless for the scenarios where the user trying to open a socket is behind a proxy.
91 WARNING: If you use the method below, HTML files in ANY domains can send arbitrary TCP data to your WebSocket server, regardless of configuration in Flash socket policy file. Arbitrary TCP data means that they can even fake request headers including Origin and Cookie.