curl-users
Multiple socket connection with server by using LIBCURL
Date: Wed, 21 Jan 2009 11:53:07 +0530
We have a requirement of creat a multiple connection with server on a port
in VC++.
1. Method returns a SOCKET by using curl_easy_getinfo(curl,
CURLINFO_LASTSOCKET, socket).
and we are using that socket to send and recive a data by using
WINSOCK2.H,
it's working with single connection.
CURL *curl;// Global variable
int ConnectToServer(SOCKET *socket)
{
char * cProxyUser ="XXXXXX";
char * cProxyPass ="XXXX";
if (curl)
{
// Now set up all of the curl options
curl_easy_setopt(curl, CURLOPT_URL, "XXXXXXXXXX");
curl_easy_setopt(curl, CURLOPT_PORT, 443);
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1);
// Attempt to Connect the remote server.
result = curl_easy_perform(curl);
if (result != CURLE_OK)
{
return result;
}
result = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, socket);
return result;
}
return 1;
}
Please help me how to do with multi connection and do't want to create a
multiple objects of CURL.
can i use mult interface and how to use it .
it's very urgent
-- Thanks and Regards Dhirendra Kumar Software Engineer Tera Informatics Pvt. Ltd.
-------------------------------------------------------------------
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-21