cURL / Mailing Lists / curl-users / Single Mail

curl-users

closing connections on mac ppc and mac intel

From: Louie Genduso <lgenduso_at_ittvis.com>
Date: Thu, 15 Feb 2007 15:15:17 -0700

hi,
 
background
----------
- i am using libcurl 7.16.1 on both mac ppc osx 10.4 and mac intel osx
10.4
- i use the following 2 lines of c code to close all the open
connections
void CloseConnections()
{
  curl_easy_setopt(g_pHCurl, CURLOPT_MAXCONNECTS, 0);
  curl_easy_setopt(g_pHCurl, CURLOPT_MAXCONNECTS, 5);
}

question
--------
- is there another way to close all the open connections?
  (w/o calling curl_easy_cleanup())

mac ppc and mac intel issue
---------------------------
- after doing a ftp get i call the above CloseConnections()
  and i notice that no connections are closed
- after doing a http get i call the above CloseConnections()
  and i notice that only the new http connections are closed
- on other platforms such as win32/64, linux32/64 and solaris32/64
  a call to CloseConnections() will close all open connections
  after any ftp or htpp get.

quesiton
--------
- why does CloseConnections() not work after a ftp get (it
  works on all the platforms except mac ppc and mac intel)

thanks,
louie

p.s. we have found libcurl to be quite good so
     many thanks to daniel stenberg for all his hard work and
     many thanks to all the contributors
Received on 2007-02-15