Sha256: 92de6e9212c13fc05ea645ececaca162f1561b0a4fa5682708f3ee82b40f49e5

Contents?: true

Size: 547 Bytes

Versions: 2

Compression:

Stored size: 547 Bytes

Contents

class Scamp
  module Connection
    private
    
    def connect(api_key, room_list)
      EventMachine.run do
        
        # Check for rooms to join, and join them
        EventMachine::add_periodic_timer(5) do
          while id = @rooms_to_join.pop
            join_and_stream(id)
          end
        end
        
        populate_room_list do
          logger.debug "Adding #{room_list.join ', '} to list of rooms to join"
          @rooms_to_join = room_list.map{|c| room_id(c) }
        end
        
      end
    end
      
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scamp-0.1.1 lib/scamp/connection.rb
scamp-0.1.0 lib/scamp/connection.rb