linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aniruddha Bhattacharyya <aniruddha.aot@gmail.com>
To: linux-c-programming@vger.kernel.org
Subject: Fwd: message queue for two processes.
Date: Sat, 14 May 2011 22:00:58 +0530	[thread overview]
Message-ID: <BANLkTimATKw7to=-YWKco0tVuErZpQZEzg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimt9L4ZUS2--Cp7D5u+L6V6ZyjcbQ@mail.gmail.com>

---------- Forwarded message ----------
From: Aniruddha Bhattacharyya <aniruddha.aot@gmail.com>
Date: Sat, May 14, 2011 at 9:51 PM
Subject: Re: message queue for two processes.
To: ratheesh kannoth <ratheesh.ksz@gmail.com>,
linux-c-programming@vger.kernel.org


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@gmail.com> 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@vger.kernel.org
> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2011-05-14 16:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-14 15:40 message queue for two processes ratheesh kannoth
     [not found] ` <BANLkTimt9L4ZUS2--Cp7D5u+L6V6ZyjcbQ@mail.gmail.com>
2011-05-14 16:30   ` Aniruddha Bhattacharyya [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTimATKw7to=-YWKco0tVuErZpQZEzg@mail.gmail.com' \
    --to=aniruddha.aot@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).