Re: PHP and Connection: Close
| From: | Chris | Date: | Tue, 21 Mar 2006 23:58:49 +0000 |
| Subject: | Re: PHP and Connection: Close | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232375@lists.php.net to get a copy of this message | ||
Jon Anderson wrote:
I've been looking at a problem with our software. It uses Flash with SOAP to connect to a PHP backend. It seems to work okay, except that at the TCP level, the client keeps initiating new connections for every soap request rather than using a single connection for multiple requests. One possible reason for this is that the server sends a "Connection: close" HTTP header after the first request. I've been trying to find a way to control this from PHP (or Apache) - anyone know a way around that kind of thing?That's the design of http - it's stateless. Each connection is treated separately and as such closes itself when it's finished. If you want to keep it open you'll need to create your own "service" that listens to a port and responds accordingly - which can be quite a lot of work. http://www.php.net/manual/en/ref.sockets.php -- Postgresql & php tutorials http://www.designmagick.com/