From 0db4f1d2a5b7545af4a9bc1997b65900f1a757a7 Mon Sep 17 00:00:00 2001 From: Logan Buesching Date: Fri, 1 Jun 2007 03:01:42 +0000 Subject: [PATCH] Finished the documentation for the cURL library. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@236790 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/curl/functions/curl-exec.xml | 6 +- .../curl/functions/curl-multi-add-handle.xml | 43 +++++++++++- reference/curl/functions/curl-multi-close.xml | 44 ++++++++++++- reference/curl/functions/curl-multi-exec.xml | 66 +++++++++++++++++-- .../curl/functions/curl-multi-getcontent.xml | 17 +++-- .../curl/functions/curl-multi-info-read.xml | 39 +++++++++-- reference/curl/functions/curl-multi-init.xml | 57 ++++++++++++++-- .../functions/curl-multi-remove-handle.xml | 18 +++-- .../curl/functions/curl-multi-select.xml | 16 ++++- 9 files changed, 277 insertions(+), 29 deletions(-) diff --git a/reference/curl/functions/curl-exec.xml b/reference/curl/functions/curl-exec.xml index 3fd5102db8..7957e7044e 100644 --- a/reference/curl/functions/curl-exec.xml +++ b/reference/curl/functions/curl-exec.xml @@ -1,5 +1,5 @@ - + curl_exec @@ -33,8 +33,8 @@ &reftitle.returnvalues; - &return.success; However, if the CURLOPT_RETURNTRANSFER option is set, - it will return the result on success, &false; on failure. + &return.success; However, if the CURLOPT_RETURNTRANSFER + option is set, it will return the result on success, &false; on failure. diff --git a/reference/curl/functions/curl-multi-add-handle.xml b/reference/curl/functions/curl-multi-add-handle.xml index a7cc023cbe..34ef3a74ec 100644 --- a/reference/curl/functions/curl-multi-add-handle.xml +++ b/reference/curl/functions/curl-multi-add-handle.xml @@ -1,5 +1,5 @@ - + curl_multi_add_handle @@ -36,7 +36,48 @@ code. + + + &reftitle.examples; + + + <function>curl_multi_add_handle</function> example + + This example will create two cURL handles, add them to a multi + handle, and then run them in parallel. + + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/curl/functions/curl-multi-close.xml b/reference/curl/functions/curl-multi-close.xml index 27a938ad1f..600ea0d3c3 100644 --- a/reference/curl/functions/curl-multi-close.xml +++ b/reference/curl/functions/curl-multi-close.xml @@ -1,5 +1,5 @@ - + curl_multi_close @@ -33,6 +33,48 @@ + + &reftitle.examples; + + + <function>curl_multi_close</function> example + + This example will create two cURL handles, add them to a multi + handle, and then run them in parallel. + + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/curl/functions/curl-multi-exec.xml b/reference/curl/functions/curl-multi-exec.xml index 01b958106d..2d3d50d1bf 100644 --- a/reference/curl/functions/curl-multi-exec.xml +++ b/reference/curl/functions/curl-multi-exec.xml @@ -1,5 +1,5 @@ - + curl_multi_exec @@ -13,9 +13,10 @@ resourcemh intstill_running - - &warn.undocumented.func; - + + Processes each of the handles in the stack. This method can be called whether or not a handle + needs to read or write data. + @@ -27,6 +28,7 @@ still_running + A reference to a flag to tell whether the operations are still running. @@ -34,6 +36,62 @@ + + &reftitle.returnvalues; + + A cURL code defined in the cURL Predefined Constants. + + + + This only returns errors regarding the whole multi stack. There might still have + occurred problems on individual transfers even when this function returns + CURLM_OK. + + + + + + &reftitle.examples; + + + <function>curl_multi_exec</function> example + + This example will create two cURL handles, add them to a multi + handle, and then run them in parallel. + + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/curl/functions/curl-multi-getcontent.xml b/reference/curl/functions/curl-multi-getcontent.xml index cd24044123..809b01ddc4 100644 --- a/reference/curl/functions/curl-multi-getcontent.xml +++ b/reference/curl/functions/curl-multi-getcontent.xml @@ -1,5 +1,5 @@ - + curl_multi_getcontent @@ -12,9 +12,11 @@ stringcurl_multi_getcontent resourcech - - &warn.undocumented.func; - + + If CURLOPT_RETURNTRANSFER is an option that is set for a specific handle, + then this function will return the content of that cURL handle in the form + of a string. + @@ -25,6 +27,13 @@ + + + &reftitle.returnvalues; + + Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set. + + &reftitle.seealso; diff --git a/reference/curl/functions/curl-multi-info-read.xml b/reference/curl/functions/curl-multi-info-read.xml index f7ce547c9a..afcb1ce720 100644 --- a/reference/curl/functions/curl-multi-info-read.xml +++ b/reference/curl/functions/curl-multi-info-read.xml @@ -1,5 +1,5 @@ - + curl_multi_info_read @@ -13,20 +13,49 @@ resourcemh intmsgs_in_queue - - &warn.undocumented.func; - + + Ask the multi handle if there are any messages/informationals from the individual transfers. + Messages may include informationals such as an error code from the transfer or just the fact + that a transfer is completed. + + + Repeated calls to this function will return a new result each time, until a &false; is returned + as a signal that there is no more to get at this point. The integer pointed to with + msgs_in_queue will contain the number of remaining messages after this + function was called. + + + + The data the returned resource points to will not survive calling + curl_multi_remove_handle. + + - + &reftitle.parameters; &curl.mh.description; + + msgs_in_queue + + + Number of messages that are still in the queue + + + + + &reftitle.returnvalues; + + On success, returns an associative array for the message, &false; on failure. + + + &reftitle.changelog; diff --git a/reference/curl/functions/curl-multi-init.xml b/reference/curl/functions/curl-multi-init.xml index 0592aa54fc..be42a0f3d4 100644 --- a/reference/curl/functions/curl-multi-init.xml +++ b/reference/curl/functions/curl-multi-init.xml @@ -1,5 +1,5 @@ - + curl_multi_init @@ -12,9 +12,9 @@ resourcecurl_multi_init - - &warn.undocumented.func; - + + Allows the processing of multiple cURL handles in parallel. + @@ -26,6 +26,55 @@ + + &reftitle.returnvalues; + + Returns a cURL on handle on success, &false; on failure. + + + + + &reftitle.examples; + + + <function>curl_multi_init</function> example + + This example will create two cURL handles, add them to a multi + handle, and then run them in parallel. + + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/curl/functions/curl-multi-remove-handle.xml b/reference/curl/functions/curl-multi-remove-handle.xml index 9a0b1bfbf6..86bd1e7828 100644 --- a/reference/curl/functions/curl-multi-remove-handle.xml +++ b/reference/curl/functions/curl-multi-remove-handle.xml @@ -1,5 +1,5 @@ - + curl_multi_remove_handle @@ -13,9 +13,12 @@ resourcemh resourcech - - &warn.undocumented.func; - + + Removes a given ch handle from the given mh + handle. When the ch handle has been removed, it is again perfectly + legal to run curl_exec on this handle. Removing a handle while being + used, will effectively halt all transfers in progress. + @@ -27,6 +30,13 @@ + + + &reftitle.returnvalues; + + On success, returns a cURL handle, &false; on failure. + + &reftitle.seealso; diff --git a/reference/curl/functions/curl-multi-select.xml b/reference/curl/functions/curl-multi-select.xml index c313573a27..5d7a490bfa 100644 --- a/reference/curl/functions/curl-multi-select.xml +++ b/reference/curl/functions/curl-multi-select.xml @@ -1,5 +1,5 @@ - + curl_multi_select @@ -13,8 +13,9 @@ resourcemh floattimeout - - &warn.undocumented.func; + + Get all the sockets associated with the cURL extension, which can then be "selected". + @@ -27,12 +28,21 @@ timeout + Time, in seconds, to wait for a response. + + + &reftitle.returnvalues; + + On success, returns the number of descriptors contained in, + the descriptor sets. On failure, this function will return &false;. + + &reftitle.seealso;