On Thu, May 23, 2002 at 09:56:22AM -0000, Vinod Panicker wrote: > But what i want is the socket which is used by Apache to send data > to the client, which is on a keep-alive connection, so that some > other program, or a php script can send data asynchronously to the > client. mind you, the client is a custom developed COM component, > not a browser. First, When a request is processed the processing-part of apache (or other webservers) are shutdown. Apache can only keep a connection open when a script doesn't reach the end.
The client (can be telnet, a custom app or even a browser) request a resource from the server. The server response on this to send data to the client. When the data is send, the request is done and the webserver goes back into listening mode, but the connection isn't closed.. A web-server can never start a asynchroon connection with the client. HTTP is never meant for 2-way communication. It's a simple request-response system. I believe that since php 4.2 php has a true socket interface. And properbly you can use the bind/accept procedures to create a php server. With pcntl you can fork the process. Because you now have full control over the socket, you can also send asynchroon data over the socket. In fact you have written you're own server.. I only don't know if php-sockets can handle multiple connections. If not, use can always create an socket-array, and assign the socket-resource to a free socket in the socket-array. But this is more the Visual Basic way.. -- With best regards, Dave Mertens, Development Manager [EMAIL PROTECTED] Innovative Solutions in Media BV Schiekade 101 3033 BG Rotterdam, Netherlands Tel. +31-10-2436060 Fax. +31-10-2436066 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php