cURL / Mailing Lists / curl-library / Single Mail


DNS Lookups.

From: Keean Schupke <>
Date: Thu, 31 Mar 2011 11:03:07 +0000


We are using the CURLOPT_OPENSOCKETFUNCTION to open a socket to our
destination. We need to be able to replace the DNS lookup, as our socket
connect function takes the host name directly not an IP address. We can get
the hostname from curl_easy_getinfo with CURLINFO_EFFECTIVE_URL inside the
open-socket-function. What we need to do now is suppress the DNS lookup, as
the hostname will not be a resolvable name. Currently we push the name into
the DNS cache using CURLOPT_RESOLVE, but this does not work when the remote
server does a redirect.

Any suggestions as to the best way to disable DNS lookup for our non-DNS


List admin:
Received on 2011-03-31