http://qs1969.pair.com?node_id=123729


in reply to bidirectional IPC (Linux)

From your description, it sounds as though pipes would be fine. You can read them when you want and you can have many pipes: one to each child. One parent can talk to each child with its own pipe. Why do you think "but as every child does this, the connection has to be between one end and many ends"? Do you need to send one message to all the clients at once? Are you trying to send a message from the parent and let a single client pick it up?

I'm not sure exactly what you need to do, but you can thread the server (that's what a lot of chat servers do) or you can use select(the four argument one) to decide when you need to read from a child.

If you give us some more information, or maybe an example of what you've tried, we might be able to be of more help.

HTH, --traveler