Permalink
Browse files

Fix for chatroom example.

  • Loading branch information...
1 parent 21c1f73 commit 15ccb44f207dbcc6794866dd68c25f927f9cbbad @hamax committed Oct 23, 2011
Showing with 18 additions and 6 deletions.
  1. +8 −5 examples/chatroom/chatroom.py
  2. +10 −1 examples/chatroom/index.html
View
13 examples/chatroom/chatroom.py
@@ -30,15 +30,18 @@ def on_close(self):
p.send("A user has left.")
#use the routes classmethod to build the correct resource
-ChatRouter = tornadio.get_router(ChatConnection)
+ChatRouter = tornadio.get_router(ChatConnection, {
+ 'enabled_protocols': [
+ 'websocket',
+ 'flashsocket',
+ 'xhr-multipart',
+ 'xhr-polling'
+ ]
+})
#configure the Tornado application
application = tornado.web.Application(
[(r"/", IndexHandler), ChatRouter.route()],
- enabled_protocols = ['websocket',
- 'flashsocket',
- 'xhr-multipart',
- 'xhr-polling'],
flash_policy_port = 843,
flash_policy_file = op.join(ROOT, 'flashpolicy.xml'),
socket_io_port = 8001
View
11 examples/chatroom/index.html
@@ -7,7 +7,16 @@
<script>
window.onload = function() {
- var s = new io.Socket(window.location.hostname, {port: 8001, rememberTransport: false});
+ var s = new io.Socket(window.location.hostname, {
+ port: 8001,
+ rememberTransport: false,
+ transports: [
+ 'websocket',
+ 'flashsocket',
+ 'xhr-multipart',
+ 'xhr-polling'
+ ]
+ });
s.connect();
s.addEvent('connect', function() {

0 comments on commit 15ccb44

Please sign in to comment.