Repository navigation
Share Handle Reference
Qriist edited this page Sep 17, 2026
·
2 revisions
The share_handle allows multiple easy_handles to share state (cookies, DNS cache, SSL sessions) through a common pool. This reference lists the core methods which operate on a share_handle, their primary function, and links to the official libcurl documentation.
| Method | Description | libcurl Reference |
|---|---|---|
ShareInit() |
Creates a new share handle. | curl_share_init |
ShareCleanup(share_handle?) |
Releases the share handle. Easy handles remain usable but lose shared state. | curl_share_cleanup |
| Method | Description | libcurl Reference |
|---|---|---|
AddEasyToShare(easy_handle?, share_handle?) |
Links an easy handle to the share pool. | curl_easy_setopt |
RemoveEasyFromShare(easy_handle?, share_handle?) |
Disassociates an easy handle from the share pool. | curl_easy_setopt |
| Method | Description | libcurl Reference |
|---|---|---|
ShareSetOpt(option, parameter, share_handle?) |
Configures what data type is shared (e.g., COOKIE, SSL_SESSION). |
curl_share_setopt |
ShareGetOpt(option, share_handle?) |
Retrieves the current value of a share option. | — |
| Method | Description | libcurl Reference |
|---|---|---|
GetShareErrorString(incomingValue) |
Resolves a share-specific error code to its string description. | curl_share_strerror |
- Easy Handle Reference — single transfer lifecycle
- Multi Handle Reference — concurrent transfer pool management
- Utility Methods Reference — standalone helper functions
Foundations
Operations
- Download Modes
- Setting and Listing Options
- Setting and Inspecting Headers
- POST and Upload
- Multiple Easy Handles
- Async and Multi Interface
- URL Construction
- Share Interface
- MIME and Multipart
- Raw Send and Receive
- Pause and Resume
- WebSocket
- SSL Sessions
- Debug and Diagnostics
API Reference
- Easy Handle Reference
- Multi Handle Reference
- Share Handle Reference
- MIME Handle Reference
- URL Handle Reference
- Utility Methods Reference
- WebSocket Reference
Code Snippets