RE: [PHP4BETA] Persistent network connections?
| From: | Michal Kolodziejczyk | Date: | Mon, 03 Jan 2000 11:31:04 +0000 |
| Subject: | RE: [PHP4BETA] Persistent network connections? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-8830@lists.php.net to get a copy of this message | ||
On Mon, 3 Jan 2000, Sander Pilon wrote:
> > Hello,
> > I have a questionL is it possible to make persistent network connection?
> > Like pfsockopen()? What I would like to do is to open a connection within
[...]
>
> IMHO, you are exploring if not crossing the edges of the scope of PHP. PHP
Yes, I am aware of this, that is why I wrote to php4beta.
> is a webscripting language, and what you want is some sort of resident
> deamonish gateway application. (from what I understand)
Yes, sort of. But I don't want to write daemon in other language or cgi
version of php. If I had persistent connection functionality in PHP, I
could easily avoid using other daemons, and it would open a whole new
world of possibilities for php.
Ideally I would like to:
<?
// page1.php
$fp=pfsockopen($host,$port);
shm_put_var($shid, $vkey, $fp)
?>
<?
//page2.php
$fp=shm_get_var($shid, $vkey);
fputs($fp, $request)
fclose($fp);
?>
If it isn't too hard to implement, I think it would be very useful.
Michal
--
_/ _/ _/_/_/ ----- Michal Kolodziejczyk, miko@wp.pl -----
_/ _/ _/ _/ _/ Wirtualna Polska SA http://www.wp.pl
_/_/_/_/ _/_/_/ ul. Uphagena 2, 80-237 Gdansk, tel/fax. (58) 3455545
_/ _/ _/ --------==* Moja WP: http://moja.wp.pl
*==----------