From e5868a071fcd0db735dde2e50bd84ae7e8763602 Mon Sep 17 00:00:00 2001 From: Adam Scheller Date: Sat, 15 Jun 2013 21:02:02 +0000 Subject: [PATCH] Documentation for curl_share_* functions git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330511 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/curl/functions/curl-share-close.xml | 61 +++++++++- reference/curl/functions/curl-share-init.xml | 60 +++++++++- .../curl/functions/curl-share-setopt.xml | 112 ++++++++++++++++-- 3 files changed, 217 insertions(+), 16 deletions(-) diff --git a/reference/curl/functions/curl-share-close.xml b/reference/curl/functions/curl-share-close.xml index 60d5b55e2c..2d831ec4cc 100644 --- a/reference/curl/functions/curl-share-close.xml +++ b/reference/curl/functions/curl-share-close.xml @@ -4,7 +4,7 @@ curl_share_close - Close a set of cURL handles + Close a cURL share handle @@ -14,11 +14,9 @@ resourcesh - + Closes a cURL share handle and frees all resources. - &warn.undocumented.func; - @@ -28,7 +26,7 @@ sh - + A cURL share handle returned by curl_share_init @@ -41,6 +39,59 @@ &return.void; + + + &reftitle.examples; + + + <function>curl_share_setopt</function> example + + This example will create a cURL share handle, add two cURL handles to it, + and then run them with cookie data sharing. + + + +]]> + + + + + + + &reftitle.seealso; + + + curl_share_init + + + diff --git a/reference/curl/functions/curl-share-init.xml b/reference/curl/functions/curl-share-init.xml index 5dd3fbb6d1..4c13d14c06 100644 --- a/reference/curl/functions/curl-share-init.xml +++ b/reference/curl/functions/curl-share-init.xml @@ -4,7 +4,7 @@ curl_share_init - Initialize a share curl handle + Initialize a cURL share handle @@ -14,11 +14,9 @@ - + Allows to share data between cURL handles. - &warn.undocumented.func; - @@ -32,6 +30,60 @@ Returns resource of type "cURL Share Handle". + + + &reftitle.examples; + + + <function>curl_share_init</function> example + + This example will create a cURL share handle, add two cURL handles to it, + and then run them with cookie data sharing. + + + +]]> + + + + + + + &reftitle.seealso; + + + curl_share_setopt + curl_share_close + + + diff --git a/reference/curl/functions/curl-share-setopt.xml b/reference/curl/functions/curl-share-setopt.xml index da61d3b391..8fb430a9cc 100644 --- a/reference/curl/functions/curl-share-setopt.xml +++ b/reference/curl/functions/curl-share-setopt.xml @@ -4,7 +4,7 @@ curl_share_setopt - Set an option for a cURL transfer + Set an option for a cURL share handle. @@ -16,11 +16,9 @@ stringvalue - + Sets an option on the given cURL share handle. - &warn.undocumented.func; - @@ -30,7 +28,7 @@ sh - + A cURL share handle returned by curl_share_init. @@ -38,7 +36,30 @@ option - + + + + + Option + Description + + + + + CURLSHOPT_SHARE + + Specifies a type of data that should be shared. + + + + CURLSHOPT_UNSHARE + + Specifies a type of data that will be no longer shared. + + + + + @@ -46,7 +67,40 @@ value - + + + + + Value + Description + + + + + CURL_LOCK_DATA_COOKIE + + Shares cookie data. + + + + CURL_LOCK_DATA_DNS + + Shares DNS cache. Note that when you use cURL multi handles, + all handles added to the same multi handle will share DNS cache + by default. + + + + CURL_LOCK_DATA_SSL_SESSION + + Shares SSL session IDs, reducing the time spent on the SSL + handshake when reconnecting to the same server. Note that SSL + session IDs are reused withing the same handle by default. + + + + + @@ -59,6 +113,50 @@ &return.success; + + + &reftitle.examples; + + + <function>curl_share_setopt</function> example + + This example will create a cURL share handle, add two cURL handles to it, + and then run them with cookie data sharing. + + + +]]> + + + +