8f8517f2289aff9f8e56c843ac8e3596808d6961
[platform/upstream/curl.git] / docs / libcurl / curl_easy_perform.3
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
13 .\" *
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
23 .SH NAME
24 curl_easy_perform - Perform a file transfer
25 .SH SYNOPSIS
26 .B #include <curl/curl.h>
27 .sp
28 .BI "CURLcode curl_easy_perform(CURL *" handle ");"
29 .ad
30 .SH DESCRIPTION
31 This function is called after the init and all the \fIcurl_easy_setopt(3)\fP
32 calls are made, and will perform the transfer as described in the options.  It
33 must be called with the same
34 .I handle
35 as input as the curl_easy_init call returned.
36
37 You can do any amount of calls to \fIcurl_easy_perform(3)\fP while using the
38 same handle. If you intend to transfer more than one file, you are even
39 encouraged to do so. libcurl will then attempt to re-use the same connection
40 for the following transfers, thus making the operations faster, less CPU
41 intense and using less network resources. Just note that you will have to use
42 \fIcurl_easy_setopt(3)\fP between the invokes to set options for the following
43 curl_easy_perform.
44
45 You must never call this function simultaneously from two places using the
46 same handle. Let the function return first before invoking it another time. If
47 you want parallel transfers, you must use several curl handles.
48 .SH RETURN VALUE
49 0 means everything was ok, non-zero means an error occurred as
50 .I <curl/curl.h>
51 defines. If the CURLOPT_ERRORBUFFER was set with
52 .I curl_easy_setopt
53 there will be a readable error message in the error buffer when non-zero is
54 returned.
55 .SH "SEE ALSO"
56 .BR curl_easy_init "(3), " curl_easy_setopt "(3), "
57