curl_share_setopt(3)

curl_share_setopt3

Set options for a shared object

Usage

#include <curl/curl.h>
CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);

Overview

Set the option to parameter for the given share.

Options

CURLSHOPT_LOCKFUNC

See CURLSHOPT_LOCKFUNC(3).

CURLSHOPT_UNLOCKFUNC

See CURLSHOPT_UNLOCKFUNC(3).

CURLSHOPT_SHARE

See CURLSHOPT_SHARE(3).

CURLSHOPT_UNSHARE

See CURLSHOPT_UNSHARE(3).

CURLSHOPT_USERDATA

See CURLSHOPT_USERDATA(3).

Examples

int main(void)
{
  CURLSHcode sh;
  CURLSH *share = curl_share_init();
  sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
  if(sh)
    printf("Error: %s\n", curl_share_strerror(sh));
}

Return value

CURLSHE_OK (zero) means that the option was set properly, non-zero means an error occurred as <curl/curl.h> defines. See the libcurl-errors(3) man page for the full list with descriptions.

Releases

135 releases since Mac OS X 10.4; the text changed 18 times.

  1. 10.4–10.4.11
  2. 10.5–10.5.8
  3. 10.6–10.6.8
  4. 10.7–10.7.5
  5. 10.8–10.8.5
  6. 10.9–10.11.6
  7. 10.12–10.12.5
  8. 10.12.6–10.14.6
  9. 10.15–11.5
  10. 12.0.1–12.2
  11. 12.3–12.5
  12. 13.0
  13. 13.1
  14. 13.2
  15. 13.3
  16. 13.4
  17. 13.5–14.1
  18. 14.2–14.4
  19. 14.5–26.5

Availability

Added in 7.10

From curl 166.0.0.0.1 in macOS 26.5. Parsed by carta from the page's man source.