Re: [PEAR] HTTP_Request2, keep-alive and re-using request objects
[email protected] (Christian Weiske) Fri, 2 Sep 2016 10:52:55 +0200
| Newsgroups | php.pear.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Christian,
> HTTP_Request2 supports keep-alive in HTTP requests.
> The question is now how to use it.
>
> The following naive code does not use it:
>
> <?php
> $req1 = new HTTP_Request2('http://example.org/1.htm');
> $res1 = $req1->send();
>
> $req2 = new HTTP_Request2('http://example.org/1.htm');
> $res2 = $req2->send();
> ?>
The code *does* indeed use it.
In the socket adapter, the connection list is static and thus
automatically shared.
--
Regards/Mit freundlichen Grüßen
Christian Weiske
-=≡ Geeking around in the name of science since 1982 ≡=-