Curl::Multi provides very high-level Ruby bindings
for the libcurl multi interface.
It was originally written for use by
causes.com to process many
concurrent http requests.
Curl::Multi is written and
maintanied by Kristján Pétursson and Keith Rarick.
$ sudo gem install curl-multi
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!
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.
This code is free to use under the terms of the GPL version 3.
Also see Keith’s web page for curl-multi information and other software.