1 # based on examples/rainsocket.ru git://github.com/lifo/cramp
2 # Rack::Lint does not like async + EM stuff, so disable it:
6 Cramp::Websocket.backend = :rainbows
8 class WelcomeController < Cramp::Websocket
9 periodic_timer :send_hello_world, :every => 2
10 on_data :received_data
12 def received_data(data)
14 render "You cant say fuck in here"
17 render "Got your #{data}"
22 render("Hello from the Server!\n" * 256)