curl_multi_setopt.3 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2022, 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_setopt 3 "4 Nov 2014" "libcurl 7.39.0" "libcurl Manual"
  25. .SH NAME
  26. curl_multi_setopt \- set options for a curl multi handle
  27. .SH SYNOPSIS
  28. .nf
  29. #include <curl/curl.h>
  30. CURLMcode curl_multi_setopt(CURLM *multi_handle, CURLMoption option, param);
  31. .fi
  32. .SH DESCRIPTION
  33. \fIcurl_multi_setopt(3)\fP is used to tell a libcurl multi handle how to
  34. behave. By using the appropriate options to \fIcurl_multi_setopt(3)\fP, you
  35. can change libcurl's behavior when using that multi handle. All options are
  36. set with the \fIoption\fP followed by the parameter \fIparam\fP. That
  37. parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject
  38. pointer\fP or a \fBcurl_off_t\fP type, depending on what the specific option
  39. expects. Read this manual carefully as bad input values may cause libcurl to
  40. behave badly. You can only set one option in each function call.
  41. .SH OPTIONS
  42. .IP CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
  43. See \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP
  44. .IP CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
  45. See \fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP
  46. .IP CURLMOPT_MAX_HOST_CONNECTIONS
  47. See \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP
  48. .IP CURLMOPT_MAX_PIPELINE_LENGTH
  49. See \fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP
  50. .IP CURLMOPT_MAX_TOTAL_CONNECTIONS
  51. See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP
  52. .IP CURLMOPT_MAXCONNECTS
  53. See \fICURLMOPT_MAXCONNECTS(3)\fP
  54. .IP CURLMOPT_PIPELINING
  55. See \fICURLMOPT_PIPELINING(3)\fP
  56. .IP CURLMOPT_PIPELINING_SITE_BL
  57. See \fICURLMOPT_PIPELINING_SITE_BL(3)\fP
  58. .IP CURLMOPT_PIPELINING_SERVER_BL
  59. See \fICURLMOPT_PIPELINING_SERVER_BL(3)\fP
  60. .IP CURLMOPT_PUSHFUNCTION
  61. See \fICURLMOPT_PUSHFUNCTION(3)\fP
  62. .IP CURLMOPT_PUSHDATA
  63. See \fICURLMOPT_PUSHDATA(3)\fP
  64. .IP CURLMOPT_SOCKETFUNCTION
  65. See \fICURLMOPT_SOCKETFUNCTION(3)\fP
  66. .IP CURLMOPT_SOCKETDATA
  67. See \fICURLMOPT_SOCKETDATA(3)\fP
  68. .IP CURLMOPT_TIMERFUNCTION
  69. See \fICURLMOPT_TIMERFUNCTION(3)\fP
  70. .IP CURLMOPT_TIMERDATA
  71. See \fICURLMOPT_TIMERDATA(3)\fP
  72. .IP CURLMOPT_MAX_CONCURRENT_STREAMS
  73. See \fICURLMOPT_MAX_CONCURRENT_STREAMS(3)\fP
  74. .SH EXAMPLE
  75. .fi
  76. /* Limit the amount of simultaneous connections curl should allow: */
  77. curl_multi_setopt(handle, CURLMOPT_MAXCONNECTS, (long)MAX_PARALLEL);
  78. .nf
  79. .SH AVAILABILITY
  80. Added in 7.15.4
  81. .SH RETURN VALUE
  82. The standard CURLMcode for multi interface error codes. Note that it returns a
  83. CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl
  84. does not know of.
  85. .SH "SEE ALSO"
  86. .BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
  87. .BR curl_multi_socket "(3), " curl_multi_info_read "(3)"