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