broadcasting a message

Hi,

It is possible for many writers to send messages to one reader using mqueues
(and named pipes).
But is there any way for one writer to broadcast message to multiple readers
through pipe-like interface
without taking case if there is somebody who wants to listen (similar to UDP
broadcasting) ?

I have two different programs, and both of them listen to messages from the
same serial device.
What if I have to run both of them? Now I have simple “splitter” which
multiplies its stdin to a number of pipes
so each program reads its own one.

Reading from one “pipe” would be much more clear (especially that you don’t
have to know in advance how many readers need the data - you could even
“cat” it to spy messages whenever you want).

Is writing own resource manager the only way? Or maybe there is another
solution (… or maybe somebody has already done it).

Daniel

I think if you want to have multiple people snooping the serial interface,
you’ll have to write a proxy resource manager to multiplex the
communications.


Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>
“Daniel Masalski” <daniel@autocomp.com.pl> wrote in message
news:a36bsg$7rm$1@inn.qnx.com

Hi,

It is possible for many writers to send messages to one reader using
mqueues
(and named pipes).
But is there any way for one writer to broadcast message to multiple
readers
through pipe-like interface
without taking case if there is somebody who wants to listen (similar to
UDP
broadcasting) ?

I have two different programs, and both of them listen to messages from
the
same serial device.
What if I have to run both of them? Now I have simple “splitter” which
multiplies its stdin to a number of pipes
so each program reads its own one.

Reading from one “pipe” would be much more clear (especially that you
don’t
have to know in advance how many readers need the data - you could even
“cat” it to spy messages whenever you want).

Is writing own resource manager the only way? Or maybe there is another
solution (… or maybe somebody has already done it).

Daniel