curl-library
Re: Reuse ports
Date: Sun, 07 Mar 2004 21:52:19 -0600
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
Received on 2004-03-08