Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (16 sloc) 0.598 kb
require 'rubygems'
require './lib/faye'
task :example, :port, :ssl do |t, args|
exec "ruby examples/ruby/server.rb #{args[:port]} #{args[:ssl] && 'ssl'}"
end
task :handshake, :port, :n, :c do |t, args|
require 'cgi'
require 'json'
message = {:channel => '/meta/handshake',
:version => '1.0',
:supportedConnectionTypes => ['long-polling']}
message = CGI.escape(JSON.dump message)
url = "http://127.0.0.1:#{args[:port]}/bayeux?jsonp=callback&message=#{message}"
puts "Request URL:\n#{url}\n\n"
exec "ab -n #{args[:n]} -c #{args[:c]} '#{url}'"
end
Jump to Line
Something went wrong with that request. Please try again.