quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

curl_share_setopt.md (1232B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: curl_share_setopt
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - curl_share_cleanup (3)
      9   - curl_share_init (3)
     10 Protocol:
     11   - All
     12 Added-in: 7.10
     13 ---
     14 
     15 # NAME
     16 
     17 curl_share_setopt - set options for a shared object
     18 
     19 # SYNOPSIS
     20 
     21 ~~~c
     22 #include <curl/curl.h>
     23 
     24 CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);
     25 ~~~
     26 
     27 # DESCRIPTION
     28 
     29 Set the *option* to *parameter* for the given *share*.
     30 
     31 # OPTIONS
     32 
     33 ## CURLSHOPT_LOCKFUNC
     34 
     35 See CURLSHOPT_LOCKFUNC(3).
     36 
     37 ## CURLSHOPT_UNLOCKFUNC
     38 
     39 See CURLSHOPT_UNLOCKFUNC(3).
     40 
     41 ## CURLSHOPT_SHARE
     42 
     43 See CURLSHOPT_SHARE(3).
     44 
     45 ## CURLSHOPT_UNSHARE
     46 
     47 See CURLSHOPT_UNSHARE(3).
     48 
     49 ## CURLSHOPT_USERDATA
     50 
     51 See CURLSHOPT_USERDATA(3).
     52 
     53 # %PROTOCOLS%
     54 
     55 # EXAMPLE
     56 
     57 ~~~c
     58 int main(void)
     59 {
     60   CURLSHcode sh;
     61   CURLSH *share = curl_share_init();
     62   sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
     63   if(sh)
     64     printf("Error: %s\n", curl_share_strerror(sh));
     65 }
     66 ~~~
     67 
     68 # %AVAILABILITY%
     69 
     70 # RETURN VALUE
     71 
     72 CURLSHE_OK (zero) means that the option was set properly, non-zero means an
     73 error occurred as *\<curl/curl.h\>* defines. See the libcurl-errors(3) man
     74 page for the full list with descriptions.