Archive

Posts Tagged ‘Curb’

ANN – Curb 0.3.1 magic multi release

March 19th, 2009

It’s been nearly 8 months, since I decided to add multi interface support to curb.  Now we have a new release on rubyforge (0.3.1)

The major changes includes:

  • Add multi interface support
  • Avoid blocking other ruby threads while in a easy perform
  • Add support for HTTP DELETE Requests
  • Add basic support for HTTP PUT Requests (not from a file)
  • Ruby 1.9.1 Support
  • Upgraded packaging and dependencies for build and package
  • Upgraded test harness to run stressing the libcurl http code base
  • Incorporated 8 months of testing and development through github contributors

Read more…

Software ,

Curb gits Forked

August 25th, 2008

Git has really made it much easier to share code.  ~23 days after posting curb to github, it now has a fork that’s added direct methods for making a PUT and DELETE request.

Software , ,

Adding ruby thread scheduling to curb

August 4th, 2008

Ruby threads require care when writing an extension – especially when the extension does anything over a network. In the case of curb, it’s often used as a replacement to the built in ruby net/http library.
Read more…

Software , ,

curb to github

July 15th, 2008

I’ve made a few more improvements to curb and decided keeping track of all these patches is too much. I’m now tracking my changes on github, and hopefully the curb author will reappear to review the changes soon, so we can get them released in gem form.

Software ,

New curb patch, on_success, and on_failure

July 10th, 2008

I added a new callback hook to curb on_success and on_failure. They work as advertised and are esspecially useful when using the Curl::Multi interface from my last patch.

gc = Curl::Easy.new("http://www.google.com/")
gc.on_success{|curl| puts curl.body_str }
yc = Curl::Easy.new("http://www.yahoo.com/")
yc.on_success{|curl| puts curl.body_str }

mc = Curl::Multi.new
mc.add(gc)
mc.add(yc)

mc.perform

Read more…

Software , ,

Updated curb multi interface patch

July 3rd, 2008

I’ve updated my patch for curb multi interface and tested against valgrind for memory leaks. So far the patch looks stable. I’m still waiting to hear from the curb author. In the meantime here’s how to apply the patch if you’re interested.

Check out curb trunk

svn co svn://rubyforge.org/var/svn/curb/TRUNK/curb

Grab my latest patch

wget http://taf2-patches.s3.amazonaws.com/curb-multi.patch

Apply the patch

patch -p0 < curb-multi-3.patch

Read more…

Software , ,

curb meet multi interface

July 2nd, 2008

I spent the day working on adding multi interface support to curb. I really like the curb ruby interface and with a little work can now use the same Curb::Easy interface and run the handles through the asynchronous Curb::Multi interface. The patch hasn’t been rigorously tested, but hey not bad for my first day.
Here’s the patch

Software , ,