cURL / Mailing Lists / curl-users / Single Mail

curl-users

multiple connection on same port with diffrent socket ;

From: Dhiren <simplydhirendra_at_gmail.com>
Date: Tue, 20 Jan 2009 13:04:35 +0530

CURL *curl;

int ConnectToServer(unsigned char *chServerAddress
            ,int iServerPort
            ,bool bProxy
            ,ProxyType enumType
            ,unsigned char *chProxyAddress
            ,int iProxyPort
            ,AuthenticationType enumAuthType
            ,unsigned char *cProxyUser
            ,unsigned char *cProxyPassword
            ,SOCKET *Socket
            )
{
 curl = curl_easy_init();
 if(curl)
 {
  curl_easy_setopt(curl, CURLOPT_URL,chServerAddress);
  curl_easy_setopt(curl, CURLOPT_PORT, iServerPort);
  curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1);
    }
  result = curl_easy_perform(curl);
  if (result == CURLE_OK)
  {
   result = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, Socket);
  }
  return result;

 }
 else
 {
  return CURLE_FAILED_INIT;// CURL Initialize error
 }
}
i wanted to use this method with multiple connection on same port with
diffrent socket ;
so please help me what to do.
i don't want to make multiple curl objects because the number of connection
is more..

is

-- 
Thanks and Regards
Dhirendra Kumar || Software Engineer

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-01-20