From 2b5cf0d265c37e1c6cdbc0d5b782a4338fb722e7 Mon Sep 17 00:00:00 2001 From: maxwell Date: Mon, 28 Jun 2010 10:11:47 -0700 Subject: [PATCH] my websocket works. wut up --- config/initializers/socket.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/socket.rb b/config/initializers/socket.rb index 32debfd65..a6e9a6aa1 100644 --- a/config/initializers/socket.rb +++ b/config/initializers/socket.rb @@ -15,10 +15,10 @@ module WebSocket EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080, :debug =>false) do |ws| ws.onopen { - + puts ws.request['Cookie'] sid = @channel.subscribe { |msg| ws.send msg } - ws.onmessage { |msg| @channel.push msg; puts msg} + ws.onmessage { |msg| puts msg}#@channel.push msg; puts msg} ws.onclose { @channel.unsubscribe(sid) } }