cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_easy_setopt to allow for specifying the IP for connect() ?

From: Geff <boing_at_boing.com>
Date: Sat, 08 Jul 2006 23:01:56 -0700

All,

I'm trying to avoid DNS lookups. I want to provide the IP for the
connection from some other method. I've been searching the lists and
the help pages and the documentation. I haven't found any way to be
able to do something like the following:

curl_easy_setopt(CURLOPT_IP,"1.2.3.4");
/* with whatever data type - string probably not the best choice, but a
possibility */

Is that possible?

Something similar to the following:

CURLOPT_PORT
     Pass a long specifying what remote port number to connect to,
     instead of the one specified in the URL or the default port for
     the used protocol.

Or heck maybe even a to pass in something like this:

struct sockaddr_in serv_addr;
curl_easy_setopt(CURLOPT_SOCKADDR_IN,serv_addr);

or something else appropriate. I'm pretty flexible here. Great
library! I like the way I can drive the process and things are using
non-blocking connect. Very nice. There is no excuse for not using
non-blocking connects!

Thanks much,

Geff
Received on 2006-07-09