curl-library
RE: Winsock and CURL
Date: Fri, 8 Sep 2006 00:15:12 +0200 (CEST)
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.htmlReceived on 2006-09-08