curl_multi_init.3 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 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 https://curl.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. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .TH curl_multi_init 3 "1 March 2002" "libcurl" "libcurl"
  25. .SH NAME
  26. curl_multi_init - create a multi handle
  27. .SH SYNOPSIS
  28. .nf
  29. #include <curl/curl.h>
  30. CURLM *curl_multi_init();
  31. .fi
  32. .SH DESCRIPTION
  33. This function returns a pointer to a \fICURLM\fP handle to be used as input to
  34. all the other multi-functions, sometimes referred to as a multi handle in some
  35. places in the documentation. This init call MUST have a corresponding call to
  36. \fIcurl_multi_cleanup(3)\fP when the operation is complete.
  37. .SH EXAMPLE
  38. .nf
  39. /* init a multi stack */
  40. multi_handle = curl_multi_init();
  41. /* add individual transfers */
  42. curl_multi_add_handle(multi_handle, http_handle);
  43. curl_multi_add_handle(multi_handle, http_handle2);
  44. .fi
  45. .SH AVAILABILITY
  46. Added in 7.9.6
  47. .SH RETURN VALUE
  48. If this function returns NULL, something went wrong and you cannot use the
  49. other curl functions.
  50. .SH "SEE ALSO"
  51. .BR curl_multi_cleanup "(3)," curl_global_init "(3)," curl_easy_init "(3)"