projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- better example/approach of using the protected HttpRequestPool methods
[m6w6/ext-http]
/
http_requestpool_object.c
diff --git
a/http_requestpool_object.c
b/http_requestpool_object.c
index c0ae1357d3e9ca9126a11907faaff40af9c951b4..b6662e1c7f7fca9a62bbe813190e42a32b0a8ea5 100644
(file)
--- a/
http_requestpool_object.c
+++ b/
http_requestpool_object.c
@@
-333,20
+333,20
@@
PHP_METHOD(HttpRequestPool, send)
* public function send()
* {
* while ($this->socketPerform()) {
* public function send()
* {
* while ($this->socketPerform()) {
- * $this->handleRequests();
* if (!$this->socketSelect()) {
* throw new HttpSocketExcpetion;
* }
* }
* if (!$this->socketSelect()) {
* throw new HttpSocketExcpetion;
* }
* }
- * $this->handleRequests();
* }
*
* }
*
- * pr
ivate function handleRequests
()
+ * pr
otected final function socketPerform
()
* {
* {
+ * $result = parent::socketPerform();
* foreach ($this->getFinishedRequests() as $r) {
* $this->detach($r);
* // handle response of finished request
* }
* foreach ($this->getFinishedRequests() as $r) {
* $this->detach($r);
* // handle response of finished request
* }
+ * return $result;
* }
* }
* ?>
* }
* }
* ?>