cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Winsock and CURL

From: Sonia Subramanian <sonia_subramanian_at_symantec.com>
Date: Thu, 7 Sep 2006 15:29:22 -0700

Thanks very much. We will keep that in mind.

Regards,
Sonia.

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Thursday, September 07, 2006 3:15 PM
To: libcurl development
Cc: Charlotte Chang; Robert Spath; Shalu Jain; Peter Van Nuys; Robert
Herstein
Subject: RE: Winsock and CURL

On Thu, 7 Sep 2006, Sonia Subramanian wrote:

> The reason for my question is that on Win CE we are setting the local
port.
> We have only 2 ports available to us. So we want to keep a port open
all
> thru the connection. If Winsock releases a socket, reconnecting on the
same
> local port has a 3 minute delay that we want to avoid. So we basically
want
> to say we have connected here at the start of the session and keep
that
> going until we exit the application. If I use just one CURL structure
and
> init it at the start and do the cleanup at the end - will I be using
just
> one socket all thru - since we will specify the local port using the
> CURLOPTs?

libcurl is written to attempt to keep connections persistent as much as
possible, so unless the server speaks against it, a single connection
will be
kept alive an re-used as long as you re-use the handle and the network
connection is fine.

-- 
  Commercial curl and libcurl Technical Support:
http://haxx.se/curl.html
Received on 2006-09-08