CURLOPT_SHARE(3) curl_easy_setopt options CURLOPT_SHARE(3)NAME
CURLOPT_SHARE - specify share handle to use
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SHARE, CURLSH *share);
DESCRIPTION
Pass a share handle as a parameter. The share handle must have been created by a previous call to curl_share_init(3). Setting this option,
will make this curl handle use the data from the shared handle instead of keeping the data to itself. This enables several curl handles to
share data. If the curl handles are used simultaneously in multiple threads, you MUST use the locking methods in the share handle. See
curl_share_setopt(3) for details.
If you add a share that is set to share cookies, your easy handle will use that cookie cache and get the cookie engine enabled. If you
unshare an object that was using cookies (or change to another object that doesn't share cookies), the easy handle will get its cookie
engine disabled.
Data that the share object is not set to share will be dealt with the usual way, as if no share was used.
Set this option to NULL again to stop using that share object.
DEFAULT
NULL
PROTOCOLS
All
EXAMPLE
TODO
AVAILABILITY
Always
RETURN VALUE
Returns CURLE_OK
SEE ALSO CURLOPT_COOKIE(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_SHARE(3)
Check Out this Related Man Page
libcurl-share(3) libcurl share interface libcurl-share(3)NAME
libcurl-share - how to use the share interface
DESCRIPTION
This is an overview on how to use the libcurl share interface in your C programs. There are specific man pages for each function mentioned
in here.
All functions in the share interface are prefixed with curl_share.
OBJECTIVES
The share interface was added to enable sharing of data between curl "handles".
ONE SET OF DATA - MANY TRANSFERS
You can have multiple easy handles share data between them. Have them update and use the same cookie database or DNS cache! This way, each
single transfer will take advantage from data updates made by the other transfer(s).
SHARE OBJECT
You create a shared object with curl_share_init(3). It returns a handle for a newly created one.
You tell the shared object what data you want it to share by using curl_share_setopt(3).
Since you can use this share from multiple threads, and libcurl has no internal thread synchronization, you must provide mutex callbacks if
you're using this multi-threaded. You set lock and unlock functions with curl_share_setopt(3) too.
Then, you make an easy handle to use this share, you set the CURLOPT_SHARE option with curl_easy_setopt(3), and pass in share handle. You
can make any number of easy handles share the same share handle.
To make an easy handle stop using that particular share, you set CURLOPT_SHARE to NULL for that easy handle. To make a handle stop sharing
a particular data, you can CURLSHOPT_UNSHARE it.
When you're done using the share, make sure that no easy handle is still using it, and call curl_share_cleanup(3) on the handle.
SEE ALSO curl_share_init(3), curl_share_setopt(3), curl_share_cleanup(3)libcurl 7.10.7 8 Aug 2003 libcurl-share(3)
I need some assistance creating a mount to a share on an AIX system on a SuSe Linux box. I haven't had any luck using the Connect to Server option within the gui, so I am assuming I need to use the 'mount' command but need some assitance with the syntax if this is the right way to go. Any... (2 Replies)
How can I create a cookie with expiration date using either wget or curl?
I am able to use cli wget, cli curl, or php curl.
I don't see that the cookies I have created contain an expiration date, and I have a problem logging into a forum that looks for the expiration date. (2 Replies)
Hi All
Actually I have NAS Storage and Suddenly I got problem
Unable to access the CIFS share folder on windows host, however the IP is pinging and the share is accessible via share name.
The share can be accessed via share name only on Windows higher Windows Versions.
Any help guys (4 Replies)