cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Issue with Curb and closing connection

From: Emmanuel Pinault <seatmanu_at_gmail.com>
Date: Wed, 2 Sep 2009 10:38:56 -0700

Hi,

So I am executing the following code and while it is running and
waiting, I am noticing that none of the connection are being closed..
Is there a way to force the closing of the connection? I tried using
the headers as you can tell but still not working....

require 'rubygems'
require 'curb'

(1..100).each do |n|
         curl = Curl::Easy.new("http://localhost:5000")
         curl.headers["Connection"] = "Close"
         curl.http_post("/test", "q=hello")
         curl = nil
end
sleep 60

I really like libcurl but the fact that it is not closing the
connection after an object is marked to nil.. then it causes all those
connection to be open until the ruby process finished...

Thanks

Emmanuel
Received on 2009-09-02

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET