cURL / Mailing Lists / curl-library / Single Mail


Re: curl_easy_init() when network is disabled

From: Denis Bondarev <>
Date: Tue, 28 Jul 2009 00:01:24 +0300

Please use curl_easy_setopt(curl, CURLOPT_TIMEOUT,...your value...). It very
help if network is false or else... and read Error of Curl conection : .....
char errbuf[CURL_ERROR_SIZE]; ... ... curl_easy_setopt(curl,
CURLOPT_ERRORBUFFER, errbuf); .... ....
2009/7/27 Mohun Biswas <>

> Joshua Kwan wrote:
>> Is it possible to use curl_easy_init() when my network connection is
>> disabled? The reason is that my app may be used to access file:/// URLs in
>> the case of a disabled network connection and no access to our usual HTTP
>> site.
>> When I do this, I get NULL immediately back from curl_easy_init(), and no
>> debug messages, though I'm not sure if I have a properly instrumented build
>> of cURL.
>> By the way, this is on Win32. I have not tried to see if this behavior is
>> the same on Linux yet.
>> Thanks,
>> Josh
> What happens when you use the curl.exe to get a file URL with the network
> disabled? It surely does a curl_easy_init().
> MB
Received on 2009-07-27