2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2014, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
13 #if PHP_HTTP_HAVE_CURL
15 PHP_HTTP_API zend_class_entry
*php_http_client_curl_user_class_entry
;
16 PHP_HTTP_API php_http_client_curl_ops_t
*php_http_client_curl_user_ops_get();
17 PHP_MINIT_FUNCTION(http_client_curl_user
);
24 interface http\Client\Curl\User
30 const POLL_REMOVE
= 4;
35 * The callback should be run when:
37 * - a watched socket needs action
39 * @param callable $run callback as function(http\Client $client, resource $socket = null, int $action = http\Client\Curl\User::POLL_NONE):int (returns unfinished requests pending)
41 function
init(callable $run
);
44 * Register a timeout watcher
45 * @param int $timeout_ms desired timeout with milliseconds resolution
47 function
timer(int $timeout_ms
);
50 * (Un-)Register a socket watcher
51 * @param resource $socket the fd to watch
52 * @param int $poll http\Client\Curl\Loop::POLL_* constant
54 function
socket($socket
, int $poll
);
57 * Run the loop as long as it does not block
59 * Called by http\Client::once()
64 * Wait/poll/select (block the loop) until events fire
66 * Called by http\Client::wait()
68 * @param int $timeout_ms block for maximal $timeout_ms milliseconds
70 function
wait(int $timeout_ms
= null
);
75 * Called by http\Client::send() while there are unfinished requests and
76 * no exception has occurred
87 * vim600: noet sw=4 ts=4 fdm=marker
88 * vim<600: noet sw=4 ts=4