Curl::Multi

Get Version

0.2

→ ‘curl-multi’

What

Curl::Multi provides very high-level Ruby bindings for the libcurl multi interface.

It was originally written for use by www.causesonfacebook.com to process many concurrent http requests. Curl::Multi is written and maintanied by Kristján Pétursson and Keith Rarick.

Installing

$ sudo gem install curl-multi

The basics

require 'curl-multi'
curl = Curl::Multi.new
on_success = lambda do |body|
  puts body
end
on_failure = lambda do |ex|
  puts 'Failure.'
  puts ex
end
curl.get('http://www.example.org/', on_success, on_failure)
curl.select([], []) while curl.size > 0

There’s not much more to the interface. A good thing, too, because we don’t really have any documentation yet. Patches are most welcome!

Forum

http://groups.google.com/group/ruby-curl-multi

How to submit patches

1. Download the latest release from http://rubyforge.com/projects/curl-multi/.

2. Make your change.

3. Send mail to Keith describing your changes.

Soon we’ll set up a public git repository. That’ll make submitting patches much easier.

License

This code is free to use under the terms of the GPL version 3.

Contact

Comments are welcome. Send mail to Keith Rarick or discuss things in the forum.

Also see Keith’s web page for curl-multi information and other software.

Keith Rarick, 19th February 2008
Theme extended from Paul Battley