Re: Re: [PHP-DEV] Full-duplex communication
| From: | Vinod Panicker | Date: | Thu, 23 May 2002 13:49:36 +0000 |
| Subject: | Re: Re: [PHP-DEV] Full-duplex communication | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-84299@lists.php.net to get a copy of this message | ||
Cool.. exactly the kind of info that i was looking for... Tx a lot, i'll check and get back to you
Tx,
Vinod.
On Thu, 23 May 2002 Faisal Nasim wrote :
Vinod, On Thu, 23 May 2002 Faisal Nasim wrote : Hi, Why not simply use Apache to forward to the request to your PHP script or 'other program' and deploy threads for whatever process you want to run in the background? I dont want to run anything else in the background. All i want to do is to have the ability to send some data to the client when it is required by the system. Sorry, I didn't read your initial post. <cut> If you really need the socket, you'll probably need to make a Apache module and make it listen to the requests and do the work from the module itself. Why should i go to the trouble of making an entire apache module that does the work? I'm using PHP scripts for my Apache provides a nice API. Its quite easy to write a module and run it is a shared object. You should be easily able to get the socket. functionality and they are doing the job excellently. All i was trying to do is to make the process more efficient by having the ability to send data asynchronously without having the client poll for data all the time. Thats why i was wondering if apache might be giving some information to php regarding the socket so that i could retrieve it in my php script and store it for use later. Or if it is possible to write a php extension that would allow me to get the socket from apache and store it. Okay, just read your first post, you're stuck with a web-server. Its easy to get the socket info from an Apache module itself. You can also modify the PHP module to pass/save that socket info somewhere. I am not fully sure, but I think the code should go in: ' send_parsed_php' in mod_php4.c Check out: r->connection->remote_addr I don't know whether its going to work or not. I am just trying to give some pointers. Faisal_________________________________________________________ Click below to visit monsterindia.com and review jobs in India or Abroad http://monsterindia.rediff.com/jobs