PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

curl_setopt_array> <curl_multi_remove_handle
Last updated: Fri, 05 Sep 2008

view this page in

curl_multi_select

(PHP 5)

curl_multi_selectGet all the sockets associated with the cURL extension, which can then be "selected"

Description

int curl_multi_select ( resource $mh [, float $timeout ] )

Get all the sockets associated with the cURL extension, which can then be "selected".

Parameters

mh

A cURL multi handle returned by curl_multi_init().

timeout

Time, in seconds, to wait for a response.

Return Values

On success, returns the number of descriptors contained in, the descriptor sets. On failure, this function will return FALSE.



add a note add a note User Contributed Notes
curl_multi_select
public at grik dot net
10-Aug-2008 03:38
This function blocks the calling process until there is activity on any of the connections opened by the curl_multi interface, or until the timeout period has expired.
In other words, it waits for data to be received in the opened connections.

Internally it fetches socket pointers with "curl_multi_fdset()" and runs the "select()" C function.
It returns in 3 cases:
1. Activity is detected on any socket;
2. Timeout has ended (second parameter);
3. Process received any signal (#man kill).

The function returns an integer:
* In case of activity it returns a number, usually 1.
I suppose, it returns the number of connections with activity detected.
* If timeout expires it returns 0
* In case of error it returns -1

Thanks for attention, hope this helps.

curl_setopt_array> <curl_multi_remove_handle
Last updated: Fri, 05 Sep 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites