Results 1 to 2 of 2
Thread: C server-client and named pipes
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jun 2007
C server-client and named pipes
I am using named pipes on a client server model.
The client consists of 2 threads and share a memory segment with the server.
All i am trying to do is make the client communicate with the server through these pipes but i cant find a way to synchronize them.
When the client ( consists of 2 threads) is done with the shared memory manipulation the server should check if everything went fine.
When the server is done with his job on the shared memory , he should send 2 same messages to these threads at the same time.
The threads should read that messages and terminate .
I don't know how to implement that , should i use 2 different pipes or just 1 is enough ?
if i use 1 how can i synchronize these threads so they both read the same value?
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
Have you thought about using posix message queues? That is a better choice for this sort of thing than named pipes.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!