CURLOPT_CONNECTTIMEOUT(3) curl_easy_setopt options CURLOPT_CONNECTTIMEOUT(3)NAME
CURLOPT_CONNECTTIMEOUT - timeout for the connect phase
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT, long timeout);
DESCRIPTION
Pass a long. It should contain the maximum time in seconds that you allow the connection phase to the server to take. This only limits the
connection phase, it has no impact once it has connected. Set to zero to switch to the default built-in connection timeout - 300 seconds.
See also the CURLOPT_TIMEOUT(3) option.
In unix-like systems, this might cause signals to be used unless CURLOPT_NOSIGNAL(3) is set.
DEFAULT
300
PROTOCOLS
All
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* complete connection within 10 seconds */
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10L);
curl_easy_perform(curl);
}
AVAILABILITY
Always
RETURN VALUE
Returns CURLE_OK
SEE ALSO CURLOPT_TIMEOUT(3), CURLOPT_LOW_SPEED_LIMIT(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_CONNECTTIMEOUT(3)
Check Out this Related Man Page
CURLOPT_ACCEPTTIMEOUT_MS(3) curl_easy_setopt options CURLOPT_ACCEPTTIMEOUT_MS(3)NAME
CURLOPT_ACCEPTTIMEOUT_MS - timeout waiting for FTP server to connect back
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);
DESCRIPTION
Pass a long telling libcurl the maximum number of milliseconds to wait for a server to connect back to libcurl when an active FTP connec-
tion is used.
DEFAULT
60000 milliseconds
PROTOCOLS
FTP
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/path/file");
/* wait no more than 5 seconds for FTP server responses */
curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 5000L);
curl_easy_perform(curl);
}
AVAILABILITY
Added in 7.24.0
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3),
libcurl 7.54.0 March 06, 2016 CURLOPT_ACCEPTTIMEOUT_MS(3)
Hi folks,
I am trying to build this GUI application that will perform some http requests to a specific server.
Basically I will use curl to "pretend" that it is a browser a sending an http request from a form.
My http knowledge is very low, and the site is tricky, but I think if I could... (3 Replies)
I can't quite seem to understand what the curl command does with a web address. I tried this:
curl O'Reilly Media: Tech Books, Conferences, Courses, News
but I just got the first few lines of a web page, and it's nowhere on my machine. Can someone elaborate? (2 Replies)
Hello all-
I'm (hopefully) trying to replace a WS_FTP (Windows program) job with a curl command in a script on UNIX.
In short, this process has been in place for some time, and in curl I am getting directory perm issues, which does not seem to be accurate, since this process has been in place... (2 Replies)
Hello,
I am wondering does anyone know of a method using curl/wget or other where by I could specify the IP address of the server I wish to query for a website.
Something similar to editing /etc/hosts but that can be done directly from the command line. I have looked through the man pages... (4 Replies)
Hi
I'm trying to download an xml file from a https server using curl on a Linux machine with Ubuntu 10.4.2
I am able to connect to the remote server with my username and password but the output is only "Virtual user <username> logged in".
I am expecting to download the xml file.
My output... (4 Replies)
Hi,
I do not find curl command in HPUX.
I used to use curl command in solaris to download files onto the server using the below command.
/opt/boksm/lib/curl http://mymachine.net:9191/faci/TSDM\$dm-orbeon/artifact/my-ear.zip -o my-ear.zip
If not curl how can the same be achived... (4 Replies)
Hello,
I need a simple shell script. If you can help I'd appreciate it. I'm sorry for my English.
I want to send ping to 3 web site
I want to send 5 ping to 3 web site
result:
1- www.google.com UP
2- www.yahoo.com UP
3- www.myserver.com DOWN
If myserver.com is down I want to 10... (12 Replies)
Hello,
when im downloading an webpage from command line (CLI) by curl or wget the target website is loaded like i load it from browser? meaning target server connect to database and render data from mysql? Or only static content is downloaded? (2 Replies)
I am using the below curl command to download a single file from client server and it is working as expected
curl --ftp-ssl -k -u ${USER}:${PASSWD} ftp://${HOST}:${PORT}/path/to/${FILE} --output ${DEST}/${FILE}
let say the client has 3 files hellofile.101, hellofile.102, hellofile.103 and I... (3 Replies)
Dear Everyone,
Thank you for all the great comments, feedback and patience during our recent modernization efforts at unix.com.
Now, I need to decide where to go next, as we move into the next phase.
Some of the ideas I have are:
Make the UserCP experience and all those non-public... (6 Replies)
Hi,
I write a new thread to discuss about my closed topic with new information ( /280990-curl-post-form-issue.html )
The previous post was closed because of missing informations, I didn't have access yet to server logs.
----------------------------------------------------------------------... (4 Replies)
Hi,
As an exercise, I am attempting to scrape the following website to obtain ticket price for a certain journey, so I can capture the cheapest ticket by running the script hourly.
... (4 Replies)