curl_share_init

Syntax

#include <curl/curl.h>

CURLSH *curl_share_init( );

Parameters

None.

Return Values

If the operation was successful, CURLESH_OK is returned. Otherwise, a specific CURLSH libcurl Error Code is returned. If this function returns NULL, an issue occurred (out of memory, etc.) and the share object was not created.

Description

Create a shared object. This function returns a CURLSH handle to be used as input to all the other share-functions. The CURLSH handle is occasionally referred to as a 'share handle' in the documentation. This initialization call must have a corresponding call to curl_share_cleanup when all operations using the share are complete.

This share handle is passed to curl using the CURLOPT_SHARE option with curl_easy_setopt, to make that specific curl handle use the data in this share.

Do Not Call From

None.

See Also

HTTP Client Library (libcurl)
libcurl API Functions
libcurl Error Codes
curl_share_cleanup
curl_share_setopt

Revision History

2013/09/18 Conversion
2013/05/08 Automated cleanup pass.
2012/05/04 Initial version.


CONFIDENTIAL