Hi Chris, I am indeed speaking of the DNS resolution. The Primary IP is indeed what I am looking for I think. But I am using the .NET edition (c#) of curl and I don't think this information item is implemented yet (correct me if I'm wrong).
Better explanation: When connecting to an domain, say for example google.nl you can create an connection with more than 1 IP address (there are more IP addresses linked to one domain address). So what I want to know is: Which IP address is Curl using when it is getting a list of IP address from one domain address. If I know this I know which IP address I have visited when connecting to an domain. I hope this is a better explanation. Thanks, Ruben. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Christopher Conroy Sent: donderdag 8 april 2010 2:10 To: libcurl development Subject: Re: Server IP address On Wed, Apr 7, 2010 at 3:24 AM, Ruben Thijssen <[email protected]> wrote: > > Hi, > > > > I am currently working on a project where I use the curl library. > > Curl is working fine but I have a question about multiple IP addresses on one > host. > > When curl is visiting a URL that has more than 1 IP address. Which IP address > is curl choosing and/or how can I see which IP address is used to connect to > the webpage? > > > > Thanks in advance. > > > > Ruben. > > ------------------------------------------------------------------- > List admin: http://cool.haxx.se/list/listinfo/curl-library > Etiquette: http://curl.haxx.se/mail/etiquette.html Ruben, Are you asking about DNS resolution? If so, that's typically handled by c-ares alongside libcurl. If not, you'll need to explain a bit more clearly. If you want to figure what IP the connection ended up with, you can query CURLINFO_PRIMARY_IP see: http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html -- Chris Conroy ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
