Persistant Socket Across Different Scripts
| From: | Justin Borodinsky | Date: | Wed, 01 Sep 2004 01:39:35 +0000 |
| Subject: | Persistant Socket Across Different Scripts | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-24481@lists.php.net to get a copy of this message | ||
I am trying to figure out if there is a way to have a socket persist
in different executions of the same script. My situation is as
follows; I have a Java program running and waiting for connections on
port 10000. When it receives a connection it reads a "device" id and
loads a device driver for it and then passes the stream to this
driver.
I would like to be able to communicate over this stream with the
client using a browser and PHP. I can open the stream when the script
runs for the first time, but each time the user gets the script again
the connection is being re-made. I tried pfsockopen but it seemed to
work the same of fsockopen.
Thanks very much,
Justin