One last question, do you know how or what method I would use to do this
via a php script? Everything I've tried fails. Like


Makeconnection.php
<?
   $mysocket = pfsocketopen('my.server.com', '1234');
?>
--------------


testconenction.php
<?
   fputs($mysocket, "VERSION\n");
   echo fgets($mysocket, 255);
?>


if I call the makeconnection.php script and then call the testconnection
right after it fails with invalid file resource error.

> -----Original Message-----
> From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 2:47 PM
> To: Gareth Hastings; 'PHP-List'
> Subject: Re: [PHP] Some questions regarding pfsocketopen()
> 
> --- Gareth Hastings <[EMAIL PROTECTED]> wrote:
> > Could anyone tell me, is it possible to connect to
> > a persistent socket after it has been opened by a
> > different script?
> 
> Sure. Think of it like a persistent database connection in
> Oracle, where the listener is on socket 1521 for everyone.
> 
> The persistent part saves you from the 3-way handshake when
> you use the same socket on subsequent page requests. The
> only caveat is that you can only do one thing at a time,
> but this is typically handled for you at a lower level in
> the form of a queue. If I remember correctly, you can
> specify the size of the queue in your function call(s).
> 
> Chris
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to