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