Hi,
I'm trying to write the following program:
A browser connects to an apache web-server where a PHP application is
running. Most of the actions of the application are Mysql database actions.
There are however also actions that needs to be done on the client side
but that are not possible inside a browser (output to a display on a
serial connection, printing to multiple printers...). For these actions
I wrote a .NET program that is running on the client side and makes a
TCP connection to a PHP server that is running on the same server as the
webserver.
This PHP server is a multithreaded server that spawns child threads.
Every connection from every user is handled by a seperate child thread.
So, on the client side, I have a .NET program with a persistent
connection to the PHP server and a browser connecting to apache that
runs a PHP application.
If the user chooses to perform an action that needs to be done on the
client side (let's say output data to a serial connection), the
webserver needs to tell the PHP server to send data to the clients .NET
program (who will makes the final serial connection).
The problems I have with this setup are:
1) How does my PHP application finds out what thread is handling the TCP
connection according to the user who is logged in into the application?
2) What is the best way to send a command to this thread? Shared Memory?
Socket Pairs? Named Pipes?
3) Has anyone already made a similar setup or does anyone has good
documentation about interprocess communication?
thx
Christophe
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php