Permalink
Browse files

README fixes.

  • Loading branch information...
1 parent 350a267 commit ed231f4779e1d599c19d2be77966d228542d1abe @gimite committed May 8, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 README.md
View
8 README.md
@@ -4,7 +4,9 @@ Assuming you have Web server (e.g. Apache) running at **http://example.com/** .
1. Download [web-socket-ruby](http://github.com/gimite/web-socket-ruby/tree/master).
2. Run sample Web Socket server (echo server) in example.com with: (#1)
- $ ruby web-socket-ruby/samples/echo_server.rb example.com 10081
+```
+$ ruby web-socket-ruby/samples/echo_server.rb example.com 10081
+```
3. 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.
4. Publish the web-socket-js directory with your Web server (e.g. put it in ~/public_html).
5. Change ws://localhost:10081 to **ws://example.com:10081** in sample.html.
@@ -67,7 +69,7 @@ and use Developer Tools (Chrome/Safari) or Firebug (Firefox) to see if console.l
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.
-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.
+4. If you are NOT using web-socket-ruby or em-websocket as your WebSocket server, you need to place Flash socket policy file on your server. See "Flash socket policy file" section below for details.
5. Check if sample.html bundled with web-socket-js works.
@@ -99,7 +101,7 @@ It may or may not work on other browsers such as Safari, Opera or IE 6. Patch fo
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.
-If you use [web-socket-ruby](http://github.com/gimite/web-socket-ruby/tree/master) or [em-websocket](https://github.com/igrigorik/em-websocket), 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.
+If you use [web-socket-ruby](http://github.com/gimite/web-socket-ruby/tree/master) or [em-websocket](https://github.com/igrigorik/em-websocket), you don't need anything special, because they handle 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 the libraries provide.
If you use other Web Socket server implementation, you need to provide socket policy file yourself. See [Setting up A Flash Socket Policy File](http://www.lightsphere.com/dev/articles/flash_socket_policy.html) for details and sample script to run socket policy file server. [node.js implementation is available here](http://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/transports/flashsocket.js).

0 comments on commit ed231f4

Please sign in to comment.