Sha256: 979e297a274ada018d85f19426025584169ddd5d95b7e3c1e093830352335596

Contents?: true

Size: 574 Bytes

Versions: 1

Compression:

Stored size: 574 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scamp-0.0.4 lib/scamp/connection.rb