PageRenderTime 26ms CodeModel.GetById 34ms RepoModel.GetById 0ms app.codeStats 0ms

/simple_chat/index.cfm

https://github.com/andreacfm/websockets_example_apps
ColdFusion | 44 lines | 36 code | 8 blank | 0 comment | 2 complexity | 4900be2b9d73742e1ec417575b0bbb7f MD5 | raw file
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Railo Websockects Demo Apps - Simple Chat</title>
  5. <link href="assets/style.css" rel="stylesheet" type="text/css">
  6. </head>
  7. <body>
  8. <div id="main">
  9. <h1>Simple Chat</h1>
  10. <p>
  11. This example apps shows a very basis usage of the Websocket Gateway Extension. A very basic chat is nothing more than a server able to keep
  12. opened sockets and push messages to any listening client.<br/>
  13. This is the basic behaviour of our websockets server so we do not need to configure any listener for running
  14. this very easy example.
  15. </p>
  16. <h2>Run the chat</h2>
  17. <ul>
  18. <li>Go to your Railo Admin and create a WebSocket Gateway that listen on port <b>10125</b>. Use the name you like. Start the gateway.</li>
  19. <li>Go to page <a href="chat.cfm" target="_blank">chat.cfm</a>.</li>
  20. <li>Choose a nickname and click connect. Open another browser and call the same page. Choose a different nickname , click connect and start to chat.</li>
  21. </ul>
  22. <h2>Important</h2>
  23. <p>Not all the browsers support websockets out of the box. This example does not implement any library that allows a failover to flash for browser that doeas not support
  24. websockets. You can use Chrome, Safari or Firefox4(in beta up to this time).
  25. </p>
  26. <h2>Create a Websocket</h2>
  27. <p>For making this example a bit fancy (ok is not fancy but at least you look at that !!!) some more js and css has been added. Btw creating a websocket in pure javascript
  28. is incredibly easy.
  29. </p>
  30. <script src="https://gist.github.com/810140.js?file=websocket%20base"></script>
  31. <h2>More about the Gateway</h2>
  32. <p>Find more info about the gateway in the <a href="http://wiki.getrailo.org/wiki/Extensions:WebSockets_Gateway" target="_blank">Railo wiki pages</a></p>
  33. <p>Clone the source from <a href="https://github.com/andreacfm/WebSocket-Gateway-Extension" target="_blank">Github</a></p>
  34. </div>
  35. </body>
  36. </html>