sample/cui_chat_client.rb in em-rocketio-client-0.0.1 vs sample/cui_chat_client.rb in em-rocketio-client-0.0.2

- old
+ new

@@ -2,15 +2,15 @@ $:.unshift File.expand_path '../lib', File.dirname(__FILE__) require 'rubygems' require 'em-rocketio-client' name = `whoami`.strip || 'shokai' +url = ARGV.shift || 'http://localhost:5000' +type = ARGV.shift || :websocket EM::run do - io = EM::RocketIO::Client.new('http://localhost:5000').connect + io = EM::RocketIO::Client.new(url, :type => type).connect # io = EM::RocketIO::Client.new('http://localhost:5000', :type => :comet).connect - - puts "waiting #{io.url}" io.on :connect do |session| puts "#{io.type} connect!! (sessin_id:#{session})" end