Sha256: c27f0fb4c8fca0d47713577efe4781b4bf36e963850b96434170b61b2a040f35
Contents?: true
Size: 265 Bytes
Versions: 1
Compression:
Stored size: 265 Bytes
Contents
CometIO.on :chat do |data| self.push :chat, data end CometIO.on :connect do |id| puts "comet <#{id}> connect." end EM::defer do loop do CometIO.push :chat, :name => 'clock', :message => Time.now.to_s sleep 60 end end get '/' do haml :index end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sinatra-cometio-0.0.1 | sample/controllers/main.rb |