Re: running php method in the background

From: Date: Thu, 08 Jun 2006 15:47:05 +0000
Subject: Re: running php method in the background
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237631@lists.php.net to get a copy of this message
Nic Appleby wrote:
Hi there I have a php web script which communicates with a server using sockets. There is a method in which the client listens for messages from the server, and this blocks the client. I need a way to 'fork' a process or to get this method to run in the background so that i can process user input while not interrupting the protocol. I have searched all over the web with no luck, can anyone point me in the right direction? thanks nic ------------------------------------------------------------------------ All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm
You may be able to do this with asynchronous sockets without forking. With them, you can poll the sockets for new data in between processing user input requests. It might not be quite as fast, but it'll be a lot easier to work with. Regards, Adam Zey.

« previous php.general (#237631) next »