- release 0.18.0
[m6w6/ext-http] / php_http_request_pool_api.h
index 9f870057306d6defc901f3e544a3ec70f298cd94..e9ea75cb8eafe00b90cda3b87180b7cc10ca5dd4 100644 (file)
@@ -1,16 +1,13 @@
 /*
-   +----------------------------------------------------------------------+
-   | PECL :: http                                                         |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 3.0 of the PHP license, that  |
-   | is bundled with this package in the file LICENSE, and is available   |
-   | through the world-wide-web at http://www.php.net/license/3_0.txt.    |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | license@php.net so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 2004-2005 Michael Wallner <mike@php.net>               |
-   +----------------------------------------------------------------------+
+    +--------------------------------------------------------------------+
+    | PECL :: http                                                       |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2004-2005, Michael Wallner <mike@php.net>            |
+    +--------------------------------------------------------------------+
 */
 
 /* $Id$ */
 
 typedef struct {
        CURLM *ch;
+       zend_llist finished;
        zend_llist handles;
        zend_llist bodies;
        int unfinished;
 } http_request_pool;
 
 #define http_request_pool_responsehandler _http_request_pool_responsehandler
-extern void _http_request_pool_responsehandler(zval **req TSRMLS_DC);
+extern void _http_request_pool_responsehandler(zval **req, CURL *ch TSRMLS_DC);
 #define http_request_pool_requesthandler(r, b) _http_request_pool_requesthandler((r), (b) TSRMLS_CC)
 extern STATUS _http_request_pool_requesthandler(zval *request, http_request_body *body TSRMLS_DC);
 
@@ -59,8 +57,8 @@ PHP_HTTP_API STATUS _http_request_pool_send(http_request_pool *pool TSRMLS_DC);
 #define http_request_pool_select _http_request_pool_select
 PHP_HTTP_API STATUS _http_request_pool_select(http_request_pool *pool);
 
-#define http_request_pool_perform _http_request_pool_perform
-PHP_HTTP_API int _http_request_pool_perform(http_request_pool *pool);
+#define http_request_pool_perform(p) _http_request_pool_perform((p) TSRMLS_CC)
+PHP_HTTP_API int _http_request_pool_perform(http_request_pool *pool TSRMLS_DC);
 
 #define http_request_pool_dtor(p) _http_request_pool_dtor((p) TSRMLS_CC)
 PHP_HTTP_API void _http_request_pool_dtor(http_request_pool *pool TSRMLS_DC);