curl_share_setopt - Set options for a shared object
#include <curl/curl.h>
CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);
Set the option to parameter for the given share.
CURLSHOPT_LOCKFUNC
The parameter must be a pointer to a function matching the following prototype:
void lock_function(CURL *handle, curl_lock_data data, curl_lock_access access, void *userptr);
data defines what data libcurl wants to lock, and you must make sure that only one lock is given at any time for each kind of data.
access defines what access type libcurl wants, shared or single.
userptr is the pointer you set with CURLSHOPT_USERDATA.
CURLSHOPT_UNLOCKFUNC
The parameter must be a pointer to a function matching the following prototype:
void unlock_function(CURL *handle, curl_lock_data data, void *userptr);
data defines what data libcurl wants to unlock, and you must make sure that only one lock is given at any time for each kind of data.
userptr is the pointer you set with CURLSHOPT_USERDATA.
CURLSHOPT_SHARE
The parameter specifies
a type of data that should be shared. This may be set to one
of the values described below.
CURL_LOCK_DATA_COOKIE
Cookie data will be shared across the easy handles using this shared object.
CURL_LOCK_DATA_DNS
Cached DNS hosts will be shared across the easy handles using this shared object. Note that when you use the multi interface, all easy handles added to the same multi handle will share DNS cache by default without this having to be used!
CURLSHOPT_UNSHARE
This option does the opposite of CURLSHOPT_SHARE. It specifies that the specified parameter will no longer be shared. Valid values are the same as those for CURLSHOPT_SHARE.
CURLSHOPT_USERDATA
The parameter allows you to specify a pointer to data that will be passed to the lock_function and unlock_function each time it is called.
CURLSHE_OK (zero) means that the option was set properly, non-zero means an error occurred as <curl/curl.h> defines. See the libcurl-errors.3 man page for the full list with descriptions.
curl_share_cleanup(3), curl_share_init(3)
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.