bin/fingerpoken.rb in fingerpoken-0.2.20101216024109 vs bin/fingerpoken.rb in fingerpoken-0.2.20101217123250
- old
+ new
@@ -61,10 +61,13 @@
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 5001) do |ws|
ws.onmessage do |message|
request = JSON.parse(message)
puts "Request: #{request.inspect}"
- channel.push(request)
+ channel.push(
+ :request => request,
+ :callback => proc { |message| ws.send(JSON.dump(message)) }
+ )
end # ws.onmessage
end # WebSocket
Rack::Handler::Thin.run(
Rack::CommonLogger.new( \