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
