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