Sha256: c4a90b87d708bdc90f9d8e557198e7949b5770467c6ffc17d4378a8208be3e3e
Contents?: true
Size: 756 Bytes
Versions: 12
Compression:
Stored size: 756 Bytes
Contents
io = Sinatra::RocketIO linda = Sinatra::RocketIO::Linda io.on :connect do |client| puts "new client connect <#{client}>" end io.on :disconnect do |client| puts "bye <#{client}>" end linda.on :error do |err| STDERR.puts err end get '/' do haml :index end get '/worker' do haml :worker end get '/client' do haml :client end linda.on :write do |tuple, client| puts "write #{tuple.tuple} in <#{tuple.space}> by <#{client}>" end linda.on :read do |tuple, client| puts "read #{tuple.tuple} in <#{tuple.space}> by <#{client}>" end linda.on :take do |tuple, client| puts "take #{tuple.tuple} in <#{tuple.space}> by <#{client}>" end linda.on :watch do |tuple, client| puts "watch #{tuple.tuple} in <#{tuple.space}> by <#{client}>" end
Version data entries
12 entries across 12 versions & 1 rubygems