Re: PHP and Threads

From: Date: Mon, 22 Apr 2002 14:56:15 +0000
Subject: Re: PHP and Threads
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-83137@lists.php.net to get a copy of this message
Hi, Thanks Daniel for your excellent input. I have managed to create a forking socket handler, although I am now approched by a new issue. How do I get the sockets to communication to each other? There are several work arounds that I could implement but Im going out on a limb and hoping that there is some standard / normal way of doing this. Here is my situation: I initate a parent process which creates a child when a client comes along. Another client comes along and another child is created. I can process and parse the input from the children individually but when upon a certain command being sent by child 1, I want *all* the children to be issued a command. How would I broach this? I need any child to be able to communicate with any (or all) other children. Thanks in advance -- Dan Hardiker [dhardiker@staff.firstcreative.net] ADAM Software & Systems Engineer First Creative Ltd > Hi, > >> [My aim is to create a socket server running on a port which can take >> connections from clients (communicating in XML) running a messaging >> system between them (either broadcast style to all users, or from user >> A to users B, C and D] > > I've done something similar using PHP's PCNTL functions (process > control: forking, signals etc..): > > http://daniel.lorch.cc/projects/phpserv/ > > Feel free to dig the code. > > -daniel

« previous php.dev (#83137) next »