1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at https://curl.haxx.se/docs/copyright.html.
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" **************************************************************************
23 .TH CURLOPT_SHARE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
25 CURLOPT_SHARE \- specify share handle to use
27 #include <curl/curl.h>
29 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SHARE, CURLSH *share);
31 Pass a \fIshare\fP handle as a parameter. The share handle must have been
32 created by a previous call to \fIcurl_share_init(3)\fP. Setting this option,
33 will make this curl handle use the data from the shared handle instead of
34 keeping the data to itself. This enables several curl handles to share
35 data. If the curl handles are used simultaneously in multiple threads, you
36 \fBMUST\fP use the locking methods in the share handle. See
37 \fIcurl_share_setopt(3)\fP for details.
39 If you add a share that is set to share cookies, your easy handle will use
40 that cookie cache and get the cookie engine enabled. If you unshare an object
41 that was using cookies (or change to another object that doesn't share
42 cookies), the easy handle will get its cookie engine disabled.
44 Data that the share object is not set to share will be dealt with the usual
45 way, as if no share was used.
47 Set this option to NULL again to stop using that share object.
59 .BR CURLOPT_COOKIE "(3), "