child threads communicating with main thread via pipes

view full story

http://www.unix.com – I have a simple client/server program I am using for learning purposes. I have it setup so that after server is setup and listening it than goes into a loop where it accepts incoming client connections. After each connection, the client socket is than passed to a thread routine where it can be processed. I now need to pass information from the client to the server only. My question is what is the best way to do this? I have a loop in my main thread and if I do want to establish communication via a pipe. Should I put most of my main server code into another thread so that I can read pip (HowTos)