CURLSHOPT_UNSHARE.md (1842B)
1 --- 2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 SPDX-License-Identifier: curl 4 Title: CURLSHOPT_UNSHARE 5 Section: 3 6 Source: libcurl 7 See-also: 8 - CURLSHOPT_SHARE (3) 9 - curl_share_cleanup (3) 10 - curl_share_init (3) 11 - curl_share_setopt (3) 12 Protocol: 13 - All 14 Added-in: 7.10.3 15 --- 16 17 # NAME 18 19 CURLSHOPT_UNSHARE - remove data to share 20 21 # SYNOPSIS 22 23 ~~~c 24 #include <curl/curl.h> 25 26 CURLSHcode curl_share_setopt(CURLSH *share, CURLSHOPT_UNSHARE, long type); 27 ~~~ 28 29 # DESCRIPTION 30 31 The *type* parameter specifies what specific data that should no longer be 32 shared and kept in the share object that was created with 33 curl_share_init(3). In other words, stop sharing that data in this 34 shared object. The given *type* must be one of the values described 35 below. You can set CURLSHOPT_UNSHARE(3) multiple times with different 36 data arguments to remove multiple types from the shared object. Add data to 37 share again with CURLSHOPT_SHARE(3). 38 39 ## CURL_LOCK_DATA_COOKIE 40 41 Cookie data is no longer shared across the easy handles using this shared 42 object. 43 44 ## CURL_LOCK_DATA_DNS 45 46 Cached DNS hosts are no longer shared across the easy handles using this 47 shared object. 48 49 ## CURL_LOCK_DATA_SSL_SESSION 50 51 SSL session IDs are no longer shared across the easy handles using this shared 52 object. 53 54 ## CURL_LOCK_DATA_CONNECT 55 56 The connection cache is no longer shared. 57 58 ## CURL_LOCK_DATA_PSL 59 60 The Public Suffix List is no longer shared. 61 62 # %PROTOCOLS% 63 64 # EXAMPLE 65 66 ~~~c 67 int main(void) 68 { 69 CURLSHcode sh; 70 CURLSH *share = curl_share_init(); 71 sh = curl_share_setopt(share, CURLSHOPT_UNSHARE, CURL_LOCK_DATA_COOKIE); 72 if(sh) 73 printf("Error: %s\n", curl_share_strerror(sh)); 74 } 75 ~~~ 76 77 # %AVAILABILITY% 78 79 # RETURN VALUE 80 81 CURLSHE_OK (zero) means that the option was set properly, non-zero means an 82 error occurred. See libcurl-errors(3) for the full list with 83 descriptions.