Hi,

first of all, thanks for the bugfix. it will go into phpserv 0.02
along with a sf.net account, seperate mailinglists (to not bother php-dev
anymore :))

> 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?

The question should be, how you get the _processes_ to communicate to
each other. Als already mentioned by Steve Meyers, you could use the
signals reserved for user space: SIGUSR1 and SIGUSR2. You can send
them to another process by using posix_kill: http://php.net/posix_kill

  posix_kill($pid, SIGUSR1);

unfortunately these signals provide only limited functionality.
Another approach to IPC (inter process communication) are named pipes.
I suggest you to have a look at "Beej's Guide to Unix Interprocess
Communication", which provides an excellent hands-on introduction on
this topic:

  http://www.ecst.csuchico.edu/~beej/guide/

"Beej's Guide to Network Programming" ist worth reading, too :)

> 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.

you'd have to broadcast them to all child processes. I would use a

  child --[request]--> parent

  parent --> child 1 \
         --> child 2  |- broadcast
         --> child n /

... approach. Unfortunately my knowledge on this topic is limited.
Maybe there is someone more savvy on this list :)

-daniel



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to