Active Connections
| From: | Prathaban Mookiah | Date: | Mon, 23 Oct 2006 22:21:00 +0000 |
| Subject: | Active Connections | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-243522@lists.php.net to get a copy of this message | ||
Hello List,
I am trying to develop a web based controller for a robot. The robot has an
embedded telnet deamon and it is controlled primarily through issuing
commands on this port. I am planning to implement this system with PHP on the
server side.
Ideally what I would like to do is have two persistent active connections:
one between the browser and the webserver, and the other between the
webserver and the robot controller. When the user opens the interface for the
first time in his browser, the 2 connections are initiated and they have to
remain active till the session is closed. In the simplest case, a single
servers side PHP script would manage both these connections. I know there is
no way I can keep an active connection between the browser and server using
HTTP. I guess I will have to go for something like applets.
My question is, is there any other way this can be done in PHP. At least is
there a way I can keep the web server - controller connection alive even
after the script finishes executing and then use that connection the next
time the user tries to access the controller through the webserver.
Plus the controller outputs have to be automatically updated in the browser
window. Is an Applet-PHP Script combination a good choice for this system. Or
are MS activex controls good choice in the browser side?
Please let me know your ideas and inputs.
Thanks in advance.
Prathap