---------- Forwarded message ---------- From: Aniruddha Bhattacharyya <aniruddha.aot@xxxxxxxxx> Date: Sat, May 14, 2011 at 9:51 PM Subject: Re: message queue for two processes. To: ratheesh kannoth <ratheesh.ksz@xxxxxxxxx>, linux-c-programming@xxxxxxxxxxxxxxx each MQ has a TYPE variable (long int). struct my_MQ{ long int my_mq_type; char data[512]; }; You can select a particular message by the TYPE argument in msgget(). Say, for x, type == 2 and for y type == 3. On Sat, May 14, 2011 at 9:10 PM, ratheesh kannoth <ratheesh.ksz@xxxxxxxxx> wrote: > > There is a server (say A ) and two clients ( say x and y ). These are > communicating thru message queue mechansim. They are using same > message queue and different id to communicate. > i read like -when a message is read , this will be removed from > message queue. Then, how can process x can read only its intended > messages ? > > > -Ratheesh > -- > To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html