curl_easy_perform.3 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. You can do any amount of calls to \fIcurl_easy_perform(3)\fP while using the
  37. same handle. If you intend to transfer more than one file, you are even
  38. encouraged to do so. libcurl will then attempt to re-use the same connection
  39. for the following transfers, thus making the operations faster, less CPU
  40. intense and using less network resources. Just note that you will have to use
  41. \fIcurl_easy_setopt(3)\fP between the invokes to set options for the following
  42. curl_easy_perform.
  43. You must never call this function simultaneously from two places using the
  44. same handle. Let the function return first before invoking it another time. If
  45. you want parallel transfers, you must use several curl handles.
  46. .SH RETURN VALUE
  47. 0 means everything was ok, non-zero means an error occurred as
  48. .I <curl/curl.h>
  49. defines. If the CURLOPT_ERRORBUFFER was set with
  50. .I curl_easy_setopt
  51. there will be a readable error message in the error buffer when non-zero is
  52. returned.
  53. .SH "SEE ALSO"
  54. .BR curl_easy_init "(3), " curl_easy_setopt "(3), "