Sha256: 6096c22e7f8fadbeb28ae9a72e87407325caa11b2e6d8079f76b1a1b84c828f5

Contents?: true

Size: 692 Bytes

Versions: 22

Compression:

Stored size: 692 Bytes

Contents

class TestApp < Sinatra::Base
  register Sinatra::RocketIO
  io = Sinatra::RocketIO
  register Sinatra::RocketIO::Linda
  linda = Sinatra::RocketIO::Linda

  get '/' do
    "sinatra-rocketio-linda v#{Sinatra::RocketIO::Linda::VERSION}"
  end

  io.on :connect do |client|
    puts "new client <session:#{client.session}> <type:#{client.type}>"
  end

  io.on :disconnect do |client|
    puts "disconnect client <session:#{client.session}> <type:#{client.type}>"
  end

  io.on :check_expire do |data, client|
    puts "check_expire"
    linda.check_expire
  end

  io.on :* do |event, data, client|
    next unless event.to_s =~ /linda/
    puts "#{event} - #{data} from #{client}"
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
em-rocketio-linda-client-1.1.1 test/app/main.rb
em-rocketio-linda-client-1.1.0 test/app/main.rb
sinatra-rocketio-linda-1.1.0 test/app/main.rb
sinatra-rocketio-linda-1.0.1 test/app/main.rb
em-rocketio-linda-client-1.0.0 test/app/main.rb
sinatra-rocketio-linda-1.0.0 test/app/main.rb
em-rocketio-linda-client-0.0.3 test/app/main.rb
sinatra-rocketio-linda-0.2.0 test/app/main.rb
sinatra-rocketio-linda-0.1.4 test/app/main.rb
sinatra-rocketio-linda-0.1.3 test/app/main.rb
sinatra-rocketio-linda-0.1.2 test/app/main.rb
sinatra-rocketio-linda-0.1.1 test/app/main.rb
sinatra-rocketio-linda-0.1.0 test/app/main.rb
em-rocketio-linda-client-0.0.2 test/app/main.rb
sinatra-rocketio-linda-0.0.9 test/app/main.rb
em-rocketio-linda-client-0.0.1 test/app/main.rb
sinatra-rocketio-linda-0.0.8 test/app/main.rb
sinatra-rocketio-linda-0.0.7 test/app/main.rb
sinatra-rocketio-linda-0.0.6 test/app/main.rb
sinatra-rocketio-linda-0.0.5 test/app/main.rb