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