Results 1 to 2 of 2
Hi all , first of all excuse me for my horrible english.
I am using named pipes on a client server model.
The client consists of 2 threads and share ...
- 10-29-2010 #1Just Joined!
- Join Date
- Jun 2007
- Posts
- 1
C server-client and named pipes
Hi all , first of all excuse me for my horrible english.
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?
- 10-29-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
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!


Reply With Quote