cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How could i known the real IP address

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 6 Dec 2007 14:59:59 +0100 (CET)

On Thu, 6 Dec 2007, Robert Iakobashvili wrote:

>> curl_easy_getinfo( CURLINFO_EFFECTIVE_URL ) can often be used for that info.
>
> There is an API to get the socket, if I am correct. Since this is a TCP
> socket for most cases, there is some platform-dependent API to find the
> peer's IP, like getpeerbyname, etc

Yes true, that mostly works as well, but isn't 100% solution either since you
can't really be sure that you'll get a socket back (for cases in which the
connection was closed etc)

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-12-06