cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Reuse ports

From: Tburhan <tburhan_at_dodo.com.au>
Date: Mon, 8 Mar 2004 15:06:15 +1000
Joe,

At any given time, the node will execute a large number of curl_perform().
That number could be 100, 1000, 10000, or even more. So when I reach certain limit, curl gives me code 28 (Resource Temporary Unavailable) and I basically had to wait for that TIME_WAIT to be able to send again.
The default TIME_WAIT is quite long, I can't afford losing the opportunity to transfer data for that long. So perhaps, my question then, is it possible to adjust that TIME_WAIT? If it is, where can I do it?

Ted

--------- Original Message --------
From: "Joe Halpin" <j.p.h@comcast.net>
To: "Tburhan" <tburhan@dodo.com.au>, "libcurl development" <curl-library@cool.haxx.se>
Subject: Re: Reuse ports
Date: 08/03/04 13:52


Tburhan wrote:
> Hi everyone,
>
> I'm trying to find out if there is a way to restrict cURL on just using
> a particular port number. I noticed that everytime I'm doing
> curl_easy_perform(), it is basically opening a new port. I did 100
> curl_easy_perform()s, and at the server end I ran a packet sniffer, and
> I could see that the packets come from the source address with 100
> different ports.
> The only option I'm setting is the CURLOPT_URL and I'm using HTTP Get.
>
> I also noticed that calling the command prompt binary "curl" also does
> the same thing.

Why do you want to control the port number? In general each file is
transferred using a different connection. If you want to use the same
port number for each connection you'll have to wait for each connection
to cycle through the TIME_WAIT stat, which will slow things down quit a bit.

What's the problem you're trying to solve?

Joe










________________________________________________

Message sent using Dodo Internet Webmail Server
Received on 2004-03-08