Sha256: 22379780aa6398d56fde4859429efdd5287a5c48d1c9c1eb79f90a19d5b2eb2c
Contents?: true
Size: 340 Bytes
Versions: 11
Compression:
Stored size: 340 Bytes
Contents
module Sinatra module RocketIO def self.channels @@channels ||= {} end end end Sinatra::RocketIO.on :__channel_id do |channel, client| channels[client[:session]] = channel client.channel = channel emit :connect, client end Sinatra::RocketIO.on :disconnect do |client, type| channels.delete client[:session] end
Version data entries
11 entries across 11 versions & 1 rubygems